diff --git a/.drone.yml b/.drone.yml index da4f226..53c9ee7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,7 @@ steps: commands: #- pandoc --standalone --output=index.html --metadata title="SMT Readme" -t html5 README.md # From https://gitlab.com/vimalkvn/pandoc-mvp-css - - pandoc -s README.md --embed-resources -c www/mvp.css --template template.html -o ./www/index.html + - pandoc -s README.md --embed-resources -c www/mvp.css --toc --toc-depth=2 --template template.html -o ./www/index.html - cp ./www/index.html /shared/index.html - name: restore-cache-with-filesystem diff --git a/README.md b/README.md index 2c92b5b..63ca7ac 100644 --- a/README.md +++ b/README.md @@ -76,10 +76,10 @@ ExecStart=/srv/smt/smt [Install] WantedBy=multi-user.target ``` -## API +## API Usage ### Login -POST `/api/login` +**POST** `/api/login` Data ``` @@ -91,7 +91,7 @@ Data This API call will return a JWT token that must be present for any other API calls to succeed. The validity duration of this token is based on the configured TOKEN_HOUR_LIFESPAN value. JWT token is returned as value of `access_token`, and must be supplied via a HTTP header in the form `"Authorization: Bearer "` for all subsequent API calls. ### Unlock -POST `/api/admin/unlock` +**POST** `/api/admin/unlock` Data ``` @@ -107,7 +107,7 @@ This API call can only be made once after the service has started. Subsequent ca ### User Operations #### Register User -POST `/api/admin/user/add` +**POST** `/api/admin/user/add` Create a new user record by specifying groupId Body @@ -134,7 +134,7 @@ Registering a user requires specifying the group to which the user will belong. This operation can only be performed by a user that is a member of a group with the admin flag enabled, or a user who has the admin flag enabled individually on their database record. #### Remove User -POST `/api/admin/user/delete` +**POST** `/api/admin/user/delete` Data ``` diff --git a/template.html b/template.html index 3a5aceb..00383a9 100644 --- a/template.html +++ b/template.html @@ -45,9 +45,8 @@ $include-before$ $endfor$ $if(title)$
- $if(toc)$ $endif$ --->

$title$

$if(subtitle)$

$subtitle$