From 68f616e99d7aa748c963e3717acd632cdfe9f64f Mon Sep 17 00:00:00 2001 From: Alexander Baryshnikov Date: Mon, 15 Jun 2020 22:38:03 +0800 Subject: [PATCH] docs: improve docs --- .gitignore | 7 +- assets/bindata.go | 4 +- clients/python/lambda_api.py | 2 +- docs/_config.yml | 13 ++- docs/_layouts/default.html | 94 ------------------ docs/administrating/index.md | 6 ++ docs/{ => administrating}/installation.md | 7 ++ docs/api/index.md | 11 +++ docs/api/lambda_api.md | 6 ++ docs/api/project_api.md | 6 ++ docs/api/user_api.md | 6 ++ docs/cgi-ctl/download.md | 53 +++++++++++ docs/cgi-ctl/index.md | 13 +++ docs/cgi-ctl/init_bare.md | 27 ++++++ docs/cgi-ctl/upload.md | 39 ++++++++ docs/cgi_ctl.md | 110 ---------------------- docs/development.md | 5 + docs/examples/blog.md | 6 ++ docs/examples/index.md | 6 ++ docs/index.md | 18 ++-- docs/{templates.md => templates/index.md} | 44 +++------ docs/templates/nimlang.md | 12 +++ docs/templates/nodejs.md | 12 +++ docs/templates/php.md | 10 ++ docs/templates/python.md | 12 +++ docs/{ => usage}/actions.md | 6 ++ docs/{ => usage}/aliases.md | 6 ++ docs/{ => usage}/git_repo.md | 6 ++ docs/usage/index.md | 8 ++ docs/{ => usage}/manifest.md | 6 ++ docs/{ => usage}/scheduler.md | 6 ++ docs/{ => usage}/security.md | 6 ++ docs/{ => usage}/static.md | 10 +- jsonrpc2.yaml | 6 ++ ui | 2 +- 35 files changed, 337 insertions(+), 254 deletions(-) delete mode 100644 docs/_layouts/default.html create mode 100644 docs/administrating/index.md rename docs/{ => administrating}/installation.md (95%) create mode 100644 docs/api/index.md create mode 100644 docs/cgi-ctl/download.md create mode 100644 docs/cgi-ctl/index.md create mode 100644 docs/cgi-ctl/init_bare.md create mode 100644 docs/cgi-ctl/upload.md delete mode 100644 docs/cgi_ctl.md create mode 100644 docs/examples/index.md rename docs/{templates.md => templates/index.md} (64%) create mode 100644 docs/templates/nimlang.md create mode 100644 docs/templates/nodejs.md create mode 100644 docs/templates/php.md create mode 100644 docs/templates/python.md rename docs/{ => usage}/actions.md (94%) rename docs/{ => usage}/aliases.md (87%) rename docs/{ => usage}/git_repo.md (84%) create mode 100644 docs/usage/index.md rename docs/{ => usage}/manifest.md (97%) rename docs/{ => usage}/scheduler.md (88%) rename docs/{ => usage}/security.md (96%) rename docs/{ => usage}/static.md (73%) diff --git a/.gitignore b/.gitignore index 7dbdbcb..f659f25 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ /.idea /build-test -/dist \ No newline at end of file +/dist +/docs/vendor +/docs/Gemfile* +/docs/.bundle +/docs/_site +/docs/.jekyll-cache \ No newline at end of file diff --git a/assets/bindata.go b/assets/bindata.go index bc95704..5607f10 100644 --- a/assets/bindata.go +++ b/assets/bindata.go @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:255ff9eb6bfbe4f6725db0436ab6c64336998bd1e1389b72afb373672ca197c5 -size 4851575 +oid sha256:158444d804a4e10bc5017976243e343539e226671e0292f16f0d3e06be682b65 +size 4851571 diff --git a/clients/python/lambda_api.py b/clients/python/lambda_api.py index b2e6559..4ec880d 100755 --- a/clients/python/lambda_api.py +++ b/clients/python/lambda_api.py @@ -2,8 +2,8 @@ from dataclasses import dataclass -from base64 import decodebytes, encodebytes from typing import Any, List, Optional +from base64 import decodebytes, encodebytes diff --git a/docs/_config.yml b/docs/_config.yml index 34dc21e..20b491c 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,5 +1,12 @@ -theme: jekyll-theme-minimal +remote_theme: pmarsceill/just-the-docs title: Trusted CGI +url: "https://trusted-cgi.reddec.net" description: Lightweight self-hosted lambda/applications/cgi/serverless-functions engine -logo: assets/logo.svg -show_downloads: true \ No newline at end of file +logo: /assets/logo.svg +permalink: pretty +show_downloads: true +aux_links: + "reddec": + - "https://reddec.net" + "GitHub": + - "//github.com/reddec/trusted-cgi" diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index c6ed87f..0000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - {% seo %} - - - - -
-
-

{{ site.title | default: site.github.repository_name }}

- - {% if site.logo %} - Logo - {% endif %} - -

{{ site.description | default: site.github.project_tagline }}

- - {% if site.github.is_project_page %} -

View the Project on GitHub {{ site.github.repository_nwo }}

- {% endif %} - - {% if site.github.is_user_page %} -

View My GitHub Profile

- {% endif %} - - {% if site.show_downloads %} - - {% endif %} -
-

Install & usage

- -

Features & docs

- - - -

API

- - - {% if site.github.is_project_page %} -

This project is maintained by {{ site.github.owner_name }}

- {% endif %} -

Hosted on GitHub Pages — Theme by orderedlist

-
-
- - {{ content }} - -
-
-
-
- -{% if site.google_analytics %} - -{% endif %} - - \ No newline at end of file diff --git a/docs/administrating/index.md b/docs/administrating/index.md new file mode 100644 index 0000000..e0c2403 --- /dev/null +++ b/docs/administrating/index.md @@ -0,0 +1,6 @@ +--- +layout: default +title: Administrating +nav_order: 3 +has_children: true +--- \ No newline at end of file diff --git a/docs/installation.md b/docs/administrating/installation.md similarity index 95% rename from docs/installation.md rename to docs/administrating/installation.md index d8504e4..509afa5 100644 --- a/docs/installation.md +++ b/docs/administrating/installation.md @@ -1,3 +1,10 @@ +--- +layout: default +title: Installation +parent: Administrating +nav_order: 1 +--- +{:toc:} # Install TL;DR; diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 0000000..104a3b8 --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,11 @@ +--- +layout: default +title: API +nav_order: 700 +has_children: true +--- + +API for the platform. Based on [JSON-RPC 2.0](https://www.jsonrpc.org/specification). + +Documentation for the API is autogenerated. See `clients` directory in a source root for pre-built +clients. \ No newline at end of file diff --git a/docs/api/lambda_api.md b/docs/api/lambda_api.md index 46762b3..955711d 100755 --- a/docs/api/lambda_api.md +++ b/docs/api/lambda_api.md @@ -1,3 +1,9 @@ +--- +layout: default +title: LambdaAPI +parent: API +--- + # LambdaAPI API for lambdas diff --git a/docs/api/project_api.md b/docs/api/project_api.md index 5072d86..d50d887 100755 --- a/docs/api/project_api.md +++ b/docs/api/project_api.md @@ -1,3 +1,9 @@ +--- +layout: default +title: ProjectAPI +parent: API +--- + # ProjectAPI API for global project diff --git a/docs/api/user_api.md b/docs/api/user_api.md index 251f250..c0dd7d1 100755 --- a/docs/api/user_api.md +++ b/docs/api/user_api.md @@ -1,3 +1,9 @@ +--- +layout: default +title: UserAPI +parent: API +--- + # UserAPI User/admin profile API diff --git a/docs/cgi-ctl/download.md b/docs/cgi-ctl/download.md new file mode 100644 index 0000000..9b11dbf --- /dev/null +++ b/docs/cgi-ctl/download.md @@ -0,0 +1,53 @@ +--- +layout: default +title: download +parent: Control util +nav_order: 200 +--- +## download + +From `0.3.1` + +Download the lambda content from a remote instance of `trusted-cgi`. + +``` +Usage: + cgi-ctl [OPTIONS] download [download-OPTIONS] + +Help Options: + -h, --help Show this help message + +[download command options] + -l, --login= Login name (default: admin) [$LOGIN] + -p, --password= Password (default: admin) [$PASSWORD] + -P, --ask-pass Get password from stdin [$ASK_PASS] + -u, --url= Trusted-CGI endpoint (default: http://127.0.0.1:3434/) [$URL] + -i, --uid= Lambda UID [$UID] + -o, --output= Output data (- means stdout, empty means as UID) [$OUTPUT] +``` + +**Example 1** (from local dev instance, lambda `e0ed902f-4a9c-4c29-870d-f343f330b6ab`): + +``` +cgi-ctl download -i e0ed902f-4a9c-4c29-870d-f343f330b6ab +``` + +will create `e0ed902f-4a9c-4c29-870d-f343f330b6ab.tar.gz` archive. + + +**Example 2** (from the remote instance, same lambda): + +``` +cgi-ctl download -i e0ed902f-4a9c-4c29-870d-f343f330b6ab --url https://example.com/ -P +``` + +will ask password for `admin` user and then download archive + +**Example 3** (from the remote instance, same lambda): + +``` +cgi-ctl download -i e0ed902f-4a9c-4c29-870d-f343f330b6ab --url https://example.com/ -P -o - | tar zxf - +``` + +will ask password for `admin` user, download archive and unpack to current directory + diff --git a/docs/cgi-ctl/index.md b/docs/cgi-ctl/index.md new file mode 100644 index 0000000..e2e89d4 --- /dev/null +++ b/docs/cgi-ctl/index.md @@ -0,0 +1,13 @@ +--- +layout: default +title: Control util +nav_order: 600 +has_children: true +--- + +`cgi-ctl` command aims to be a tool for helping developers interact with the platform without web UI. + +`cgi-ctl` includes into distribution starting from version 0.3.1 and could be obtained independently +via source code or pre-built binary ([see installation](../administrating/installation)) + +Always use `cgi-ctl --help` for actual help. \ No newline at end of file diff --git a/docs/cgi-ctl/init_bare.md b/docs/cgi-ctl/init_bare.md new file mode 100644 index 0000000..3704083 --- /dev/null +++ b/docs/cgi-ctl/init_bare.md @@ -0,0 +1,27 @@ +--- +layout: default +title: init bare +parent: Control util +nav_order: 1 +--- +## init bare + +From `0.3.0` + +Initialize a basic lambda in a current directory. + +``` +Usage: + cgi-ctl [OPTIONS] init bare [bare-OPTIONS] + +Help Options: + -h, --help Show this help message + +[bare command options] + --git Enable Git [$GIT] + -d, --description= Description (default: Bare project) [$DESCRIPTION] + -P, --private Mark as private [$PRIVATE] + -t, --time-limit= Time limit for execution (default: 10s) [$TIME_LIMIT] + -p, --max-payload= Maximum payload (default: 8192) [$MAX_PAYLOAD] + +``` diff --git a/docs/cgi-ctl/upload.md b/docs/cgi-ctl/upload.md new file mode 100644 index 0000000..d76c6f3 --- /dev/null +++ b/docs/cgi-ctl/upload.md @@ -0,0 +1,39 @@ +--- +layout: default +title: upload +parent: Control util +nav_order: 201 +--- +## upload + +From `0.3.1` + +Upload the lambda content from the current directory to a remote instance of `trusted-cgi`. + +Files defined in `.cgiignore` file will be ignored (uses `tar --exclude-form` syntax). + +``` +Usage: + cgi-ctl [OPTIONS] upload [upload-OPTIONS] + +Help Options: + -h, --help Show this help message + +[upload command options] + -l, --login= Login name (default: admin) [$LOGIN] + -p, --password= Password (default: admin) [$PASSWORD] + -P, --ask-pass Get password from stdin [$ASK_PASS] + -u, --url= Trusted-CGI endpoint (default: http://127.0.0.1:3434/) [$URL] + -o, --uid= Lambda UID [$UID] + --input= Directory (default: .) [$INPUT] +``` + + +**Example 1** (lambda `e0ed902f-4a9c-4c29-870d-f343f330b6ab`) + +``` +cgi-ctl upload -o e0ed902f-4a9c-4c29-870d-f343f330b6ab --url https://example.com/ -P +``` + + +will ask password for `admin` user, make archive and upload to the instance diff --git a/docs/cgi_ctl.md b/docs/cgi_ctl.md deleted file mode 100644 index 87dd3fc..0000000 --- a/docs/cgi_ctl.md +++ /dev/null @@ -1,110 +0,0 @@ -# CGI-CTL command help - - -`cgi-ctl` command aims to be a tool for helping developers interact with the platform without web UI. - -`cgi-ctl` includes into distribution starting from version 0.3.1 and could be obtained independently -via source code or pre-built binary ([see installation](installation.md)) - -## init bare - -From `0.3.0` - -Initialize a basic lambda in a current directory. - -``` -Usage: - cgi-ctl [OPTIONS] init bare [bare-OPTIONS] - -Help Options: - -h, --help Show this help message - -[bare command options] - --git Enable Git [$GIT] - -d, --description= Description (default: Bare project) [$DESCRIPTION] - -P, --private Mark as private [$PRIVATE] - -t, --time-limit= Time limit for execution (default: 10s) [$TIME_LIMIT] - -p, --max-payload= Maximum payload (default: 8192) [$MAX_PAYLOAD] - -``` - -## download - -From `0.3.1` - -Download the lambda content from a remote instance of `trusted-cgi`. - -``` -Usage: - cgi-ctl [OPTIONS] download [download-OPTIONS] - -Help Options: - -h, --help Show this help message - -[download command options] - -l, --login= Login name (default: admin) [$LOGIN] - -p, --password= Password (default: admin) [$PASSWORD] - -P, --ask-pass Get password from stdin [$ASK_PASS] - -u, --url= Trusted-CGI endpoint (default: http://127.0.0.1:3434/) [$URL] - -i, --uid= Lambda UID [$UID] - -o, --output= Output data (- means stdout, empty means as UID) [$OUTPUT] -``` - -**Example 1** (from local dev instance, lambda `e0ed902f-4a9c-4c29-870d-f343f330b6ab`): - -``` -cgi-ctl download -i e0ed902f-4a9c-4c29-870d-f343f330b6ab -``` - -will create `e0ed902f-4a9c-4c29-870d-f343f330b6ab.tar.gz` archive. - - -**Example 2** (from the remote instance, same lambda): - -``` -cgi-ctl download -i e0ed902f-4a9c-4c29-870d-f343f330b6ab --url https://example.com/ -P -``` - -will ask password for `admin` user and then download archive - -**Example 3** (from the remote instance, same lambda): - -``` -cgi-ctl download -i e0ed902f-4a9c-4c29-870d-f343f330b6ab --url https://example.com/ -P -o - | tar zxf - -``` - -will ask password for `admin` user, download archive and unpack to current directory - -## upload - -From `0.3.1` - -Upload the lambda content from the current directory to a remote instance of `trusted-cgi`. - -Files defined in `.cgiignore` file will be ignored (uses `tar --exclude-form` syntax). - -``` -Usage: - cgi-ctl [OPTIONS] upload [upload-OPTIONS] - -Help Options: - -h, --help Show this help message - -[upload command options] - -l, --login= Login name (default: admin) [$LOGIN] - -p, --password= Password (default: admin) [$PASSWORD] - -P, --ask-pass Get password from stdin [$ASK_PASS] - -u, --url= Trusted-CGI endpoint (default: http://127.0.0.1:3434/) [$URL] - -o, --uid= Lambda UID [$UID] - --input= Directory (default: .) [$INPUT] -``` - - -**Example 1** (lambda `e0ed902f-4a9c-4c29-870d-f343f330b6ab`) - -``` -cgi-ctl upload -o e0ed902f-4a9c-4c29-870d-f343f330b6ab --url https://example.com/ -P -``` - - -will ask password for `admin` user, make archive and upload to the instance diff --git a/docs/development.md b/docs/development.md index e257069..141b286 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,3 +1,8 @@ +--- +layout: default +title: Development +nav_order: 999 +--- # Development The project has Linux-specific features and aimed to be run in Linux ecosystem. diff --git a/docs/examples/blog.md b/docs/examples/blog.md index 69e85cf..2845066 100644 --- a/docs/examples/blog.md +++ b/docs/examples/blog.md @@ -1,3 +1,9 @@ +--- +layout: default +title: Blog +parent: Examples +nav_order: 1 +--- ## Example This is basic public comment board example: diff --git a/docs/examples/index.md b/docs/examples/index.md new file mode 100644 index 0000000..050ac44 --- /dev/null +++ b/docs/examples/index.md @@ -0,0 +1,6 @@ +--- +layout: default +title: Examples +nav_order: 800 +has_children: true +--- \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index ef25935..eb2040d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -68,12 +68,12 @@ so we don't need a heavy restriction for the application, so let's throw away do ## Docs and features -* [Manifest](manifest.md) - main and mandatory entrypoint for the lambda -* [Actions](actions.md) - arbitrary actions that could be invoked by UI or by scheduler -* [Scheduler](scheduler.md) - cron-like scheduling system to automatically call actions by time -* [Aliases](aliases.md) - permanent links and aliases/links -* [Security](security.md) - security and restrictions -* [GIT repo](git_repo.md) - using GIT repo as a function +* [Manifest](usage/manifest) - main and mandatory entrypoint for the lambda +* [Actions](usage/actions) - arbitrary actions that could be invoked by UI or by scheduler +* [Scheduler](usage/scheduler) - cron-like scheduling system to automatically call actions by time +* [Aliases](usage/aliases) - permanent links and aliases/links +* [Security](usage/security) - security and restrictions +* [GIT repo](usage/git_repo) - using GIT repo as a function **High-level components diagram** @@ -81,7 +81,7 @@ so we don't need a heavy restriction for the application, so let's throw away do **URL** -Each function contains at least one URL: `/a/` and any number of unique [aliases/links](aliases.md) `/l/`. +Each function contains at least one URL: `/a/` and any number of unique [aliases/links](usage/aliases) `/l/`. ## Why I did it? @@ -101,12 +101,12 @@ TL;DR; * locally or non-debian server - [download binary](https://github.com/reddec/trusted-cgi/releases) and run * for quick tests or for limited production - use docker image (`docker run --rm -p 3434:3434 reddec/trusted-cgi`) -See [installation manual](installation.md) +See [installation manual](administrating/installation) # Contributing The platform is quite simple Golang project with Vue + Quasar frontend -and should be easy for newcomers. Caveats and tips for backend check [here](development.md) +and should be easy for newcomers. Caveats and tips for backend check [here](development) For UI check [sub-repo](https://github.com/reddec/trusted-cgi-ui) diff --git a/docs/templates.md b/docs/templates/index.md similarity index 64% rename from docs/templates.md rename to docs/templates/index.md index e1f5674..3c22e05 100644 --- a/docs/templates.md +++ b/docs/templates/index.md @@ -1,3 +1,10 @@ +--- +layout: default +title: Templates +nav_order: 5 +has_children: true +--- + # Templates Templates are a special kind of JSON-based files that defines a structure and base files @@ -8,7 +15,7 @@ working directory as `.templates` and could be changed by `--templates` flag of Name file will be a name of template (except .json). -Templates could define files, [manifest](manifest), [actions](actions) to invoke after clone and required checks. +Templates could define files, [manifest](../usage/manifest), [actions](../usage/actions) to invoke after clone and required checks. Minimal working template file: @@ -23,8 +30,8 @@ Minimal working template file: Structure: * **description** (optional, string): short description of template -* **manifest** (required, [Manifest](manifest.md)): manifest definition for a new lambda -* **post_clone** (optional, string): [action](actions.md) to invoke after clone +* **manifest** (required, [Manifest](../usage/manifest)): manifest definition for a new lambda +* **post_clone** (optional, string): [action](../usage/actions) to invoke after clone * **checks** (optional, array of array of string): list of commands to invoke to check template availability (see example below) * **files** (optional, map of string to string): files and content in a new lambda @@ -44,32 +51,7 @@ Example check to ensure that template will be available only if python3 and pip3 ## Embedded -### Python 3 - -Host requirements: - -* make -* python3 -* python3-venv - -### Node - -Host requirements: - -* make -* node -* npm - -### PHP - -Host requirements: - -* php - -### Nim lang - -Host requirements: +Most embeddable templates will be available in Docker image or via installing debian package (with +recommended packages - installed automatically by default) -* make -* nim -* nimble +List of embedded templates below: \ No newline at end of file diff --git a/docs/templates/nimlang.md b/docs/templates/nimlang.md new file mode 100644 index 0000000..45eeac2 --- /dev/null +++ b/docs/templates/nimlang.md @@ -0,0 +1,12 @@ +--- +layout: default +title: Nim +parent: Templates +--- +### Nim lang + +Host requirements: + +* make +* nim +* nimble diff --git a/docs/templates/nodejs.md b/docs/templates/nodejs.md new file mode 100644 index 0000000..5af15e4 --- /dev/null +++ b/docs/templates/nodejs.md @@ -0,0 +1,12 @@ +--- +layout: default +title: NodeJS +parent: Templates +--- +### Node + +Host requirements: + +* make +* node +* npm \ No newline at end of file diff --git a/docs/templates/php.md b/docs/templates/php.md new file mode 100644 index 0000000..11a4ae0 --- /dev/null +++ b/docs/templates/php.md @@ -0,0 +1,10 @@ +--- +layout: default +title: PHP +parent: Templates +--- +### PHP + +Host requirements: + +* php \ No newline at end of file diff --git a/docs/templates/python.md b/docs/templates/python.md new file mode 100644 index 0000000..cfcb752 --- /dev/null +++ b/docs/templates/python.md @@ -0,0 +1,12 @@ +--- +layout: default +title: Python3 +parent: Templates +--- +### Python 3 + +Host requirements: + +* make +* python3 +* python3-venv \ No newline at end of file diff --git a/docs/actions.md b/docs/usage/actions.md similarity index 94% rename from docs/actions.md rename to docs/usage/actions.md index 41db74c..bf1f49d 100644 --- a/docs/actions.md +++ b/docs/usage/actions.md @@ -1,3 +1,9 @@ +--- +layout: default +title: Actions +parent: Usage +nav_order: 1 +--- # Actions Actions is optional arbitrary commands defined in [Makefile](https://www.gnu.org/software/make/manual/make.html#Rule-Example) as targets and can be invoked diff --git a/docs/aliases.md b/docs/usage/aliases.md similarity index 87% rename from docs/aliases.md rename to docs/usage/aliases.md index 99129c4..2f2f6c6 100644 --- a/docs/aliases.md +++ b/docs/usage/aliases.md @@ -1,3 +1,9 @@ +--- +layout: default +title: Aliases +parent: Usage +nav_order: 2 +--- # Aliases Links (or aliases) are useful to make a public links and dynamically migrate between real implementations (functions). For ex: diff --git a/docs/git_repo.md b/docs/usage/git_repo.md similarity index 84% rename from docs/git_repo.md rename to docs/usage/git_repo.md index 5404307..7461736 100644 --- a/docs/git_repo.md +++ b/docs/usage/git_repo.md @@ -1,3 +1,9 @@ +--- +layout: default +title: Git repo +parent: Usage +nav_order: 3 +--- # New function from git It's possible to use Git repo as source for diff --git a/docs/usage/index.md b/docs/usage/index.md new file mode 100644 index 0000000..0f409cb --- /dev/null +++ b/docs/usage/index.md @@ -0,0 +1,8 @@ +--- +layout: default +title: Usage +nav_order: 2 +has_children: true +--- + +To create a new lambda it's enough to just click on template icon in a dashboard. \ No newline at end of file diff --git a/docs/manifest.md b/docs/usage/manifest.md similarity index 97% rename from docs/manifest.md rename to docs/usage/manifest.md index 8a836e7..e9c7ed3 100644 --- a/docs/manifest.md +++ b/docs/usage/manifest.md @@ -1,3 +1,9 @@ +--- +layout: default +title: Manifest +parent: Usage +nav_order: 0 +--- # Manifest Manifest is the entrypoint for the server. File `manifest.json` is required for each diff --git a/docs/scheduler.md b/docs/usage/scheduler.md similarity index 88% rename from docs/scheduler.md rename to docs/usage/scheduler.md index c581db1..6df8e34 100644 --- a/docs/scheduler.md +++ b/docs/usage/scheduler.md @@ -1,3 +1,9 @@ +--- +layout: default +title: Scheduler +parent: Usage +nav_order: 4 +--- # Scheduler Each action could be automatically called in cron-tab like style. diff --git a/docs/security.md b/docs/usage/security.md similarity index 96% rename from docs/security.md rename to docs/usage/security.md index 65965ec..a077074 100644 --- a/docs/security.md +++ b/docs/usage/security.md @@ -1,3 +1,9 @@ +--- +layout: default +title: Security +parent: Usage +nav_order: 5 +--- # Security Security checks aimed to restrict access to function to the limited group of clients. diff --git a/docs/static.md b/docs/usage/static.md similarity index 73% rename from docs/static.md rename to docs/usage/static.md index 6b1d32c..33e91c1 100644 --- a/docs/static.md +++ b/docs/usage/static.md @@ -1,9 +1,15 @@ +--- +layout: default +title: Static files +parent: Usage +nav_order: 6 +--- # Static files Static files can be served by `GET` request from the specified folder. Using static serving together with lambda allows you to create dynamic service with UI (like blog or comments). -To enable the feature, set in [manifest](manifest.md) field `static` to relative path to the directory with static files +To enable the feature, set in [manifest](../../usage/manifest) field `static` to relative path to the directory with static files (must be subfolder of lambda directory). If the feature enabled the GET and HEAD methods will not be available for handler (lambda). @@ -17,4 +23,4 @@ UI: Related examples: -* [blog](examples/blog.md) \ No newline at end of file +* [blog](../../examples/blog) \ No newline at end of file diff --git a/jsonrpc2.yaml b/jsonrpc2.yaml index 9394ce9..c0ba82c 100644 --- a/jsonrpc2.yaml +++ b/jsonrpc2.yaml @@ -10,6 +10,12 @@ ts: 'clients/ts/{{.Generator.Name | snakecase | replace "." "" }}.ts' ts_shim_file: "tsshim.yaml" doc: 'docs/api/{{.Generator.Name | snakecase | replace "." "" }}.md' doc_shim_file: "docshim.yaml" +doc_header: | + --- + layout: default + title: {{.Service.Name}} + parent: API + --- output: "./{{.Generator.TypeName | snakecase}}.go" go: './../client/{{.Generator.Name | replace "." "" | snakecase}}_client.go' go_package: "client" diff --git a/ui b/ui index 187b26b..800826f 160000 --- a/ui +++ b/ui @@ -1 +1 @@ -Subproject commit 187b26b76424654541f9ee48af2227e88a69be98 +Subproject commit 800826f51c05975076e25d70192b981f42ddf2a0