summaryrefslogtreecommitdiff
path: root/docs/content/dev
diff options
context:
space:
mode:
authorTilman Vatteroth2021-01-04 13:07:44 +0100
committerTilman Vatteroth2021-01-05 13:15:32 +0100
commiteaeb88401d07687eb3db8c273f7a4c0ed31ec153 (patch)
treec05c4f17da9ce1cd0aa603febc6a14b2410e6a5e /docs/content/dev
parentd52d1d255a876fcf937c9df3717f6df9b745ad22 (diff)
Move docs into subdirectory to make mkdocs work in a subdirectory
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Diffstat (limited to '')
-rw-r--r--docs/content/dev/api.md (renamed from docs/dev/api.md)4
-rw-r--r--docs/content/dev/documentation.md27
-rw-r--r--docs/content/dev/getting-started.md (renamed from docs/dev/getting-started.md)4
-rw-r--r--docs/content/dev/openapi.yml (renamed from docs/dev/openapi.yml)0
-rw-r--r--docs/content/dev/ot.md (renamed from docs/dev/ot.md)0
-rw-r--r--docs/content/dev/webpack.md (renamed from docs/dev/webpack.md)0
6 files changed, 31 insertions, 4 deletions
diff --git a/docs/dev/api.md b/docs/content/dev/api.md
index e89741d3..0700ecc3 100644
--- a/docs/dev/api.md
+++ b/docs/content/dev/api.md
@@ -11,14 +11,14 @@ You have to replace *\<NOTE\>* with either the alias or id of a note you want to
| ---------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `/new` | `GET` | **Creates a new note.**<br>A random id will be assigned and the content will equal to the template (blank by default). After note creation a redirect is issued to the created note. |
| `/new` | `POST` | **Imports some markdown data into a new note.**<br>A random id will be assigned and the content will equal to the body of the received HTTP-request. The `Content-Type: text/markdown` header should be set on this request. |
-| `/new/<ALIAS>` | `POST` | **Imports some markdown data into a new note with a given alias.**<br>This endpoint equals to the above one except that the alias from the url will be assigned to the note if [FreeURL-mode](../configuration-env-vars.md#users-and-privileges) is enabled. |
+| `/new/<ALIAS>` | `POST` | **Imports some markdown data into a new note with a given alias.**<br>This endpoint equals to the above one except that the alias from the url will be assigned to the note if [FreeURL-mode](../configuration.md#users-and-privileges) is enabled. |
| `/<NOTE>/download` or `/s/<SHORT-ID>/download` | `GET` | **Returns the raw markdown content of a note.** |
| `/<NOTE>/publish` | `GET` | **Redirects to the published version of the note.** |
| `/<NOTE>/slide` | `GET` | **Redirects to the slide-presentation of the note.**<br>This is only useful on notes which are designed to be slides. |
| `/<NOTE>/info` | `GET` | **Returns metadata about the note.**<br>This includes the title and description of the note as well as the creation date and viewcount. The data is returned as a JSON object. |
| `/<NOTE>/revision` | `GET` | **Returns a list of the available note revisions.**<br>The list is returned as a JSON object with an array of revision-id and length associations. The revision-id equals to the timestamp when the revision was saved. |
| `/<NOTE>/revision/<REVISION-ID>` | `GET` | **Returns the revision of the note with some metadata.**<br>The revision is returned as a JSON object with the content of the note and the authorship. |
-| `/<NOTE>/gist` | `GET` | **Creates a new GitHub Gist with the note's content.**<br>If [GitHub integration](../configuration-env-vars.md#github-login) is configured, the user will be redirected to GitHub and a new Gist with the content of the note will be created. |
+| `/<NOTE>/gist` | `GET` | **Creates a new GitHub Gist with the note's content.**<br>If [GitHub integration](../configuration.md#github-login) is configured, the user will be redirected to GitHub and a new Gist with the content of the note will be created. |
## User / History
These endpoints return information about the current logged-in user and it's note history. If no user is logged-in, the most of this requests will fail with either a HTTP 403 or a JSON object containing `{"status":"forbidden"}`.
diff --git a/docs/content/dev/documentation.md b/docs/content/dev/documentation.md
new file mode 100644
index 00000000..0271792b
--- /dev/null
+++ b/docs/content/dev/documentation.md
@@ -0,0 +1,27 @@
+# Documentation
+
+Our documentation is build with [mkdocs](https://www.mkdocs.org).
+
+## Writing
+
+All documentation files are found in the `docs/content` directory of the [hedgedoc/hedgedoc repo](https://github.com/hedgedoc/hedgedoc). These files are just normal markdown files with nothing special about them.
+
+The configuration for mkdocs lies in the `docs` folder in a file called `mkdocs.yml`. With that file the theme and menu - amoung others - can be configured.
+**Please note:** Any new files need to be linked to by other files or put in the navigation or the files will be very hard to find on the documentation website.
+
+## Building
+
+To build the documentation locally you need to perform the following steps:
+
+0. Make sure you have python3 installed.
+1. Go into the `docs` folder.
+2. Install all the dependencies (E.g. with a [venv](https://docs.python.org/3/library/venv.html)) with `pip install -r requirements.txt`
+3. Start the mkdocs dev server (`mkdocs serve`) or build the documentation (`mkdocs build`).
+
+## Deployment
+
+The documentation is deployed with [Messor Structor](https://github.com/traefik/structor).
+
+The necessary Dockerfile and version menu template and also the github action to build the whole documentation can be found in the [docs.hedgedoc.org repo](https://github.com/hedgedoc/docs.hedgedoc.org). This repo is also used to deploy the actuall website to github.io.
+
+Messor Structor builds and deploys the documentation by finding all branches that follow the pattern `v*`. For each branch the docs are generated separately by first installing the dependencies from `requirements.txt` and then running mkdocs. Afterwards the menu go template is used to include a version switcher in the theme.
diff --git a/docs/dev/getting-started.md b/docs/content/dev/getting-started.md
index b7787117..b7154b05 100644
--- a/docs/dev/getting-started.md
+++ b/docs/content/dev/getting-started.md
@@ -11,8 +11,8 @@
and create configs. The setup script is written in Bash, you would need bash
as a prerequisite.
-3. Setup the [config file](../configuration-config-file.md) or set up
- [environment variables](../configuration-env-vars.md).
+3. Setup the [config file](../configuration.md) or set up
+ [environment variables](../configuration.md).
## Running the Code
diff --git a/docs/dev/openapi.yml b/docs/content/dev/openapi.yml
index c5de475c..c5de475c 100644
--- a/docs/dev/openapi.yml
+++ b/docs/content/dev/openapi.yml
diff --git a/docs/dev/ot.md b/docs/content/dev/ot.md
index a1d0bebe..a1d0bebe 100644
--- a/docs/dev/ot.md
+++ b/docs/content/dev/ot.md
diff --git a/docs/dev/webpack.md b/docs/content/dev/webpack.md
index 23bbd7a1..23bbd7a1 100644
--- a/docs/dev/webpack.md
+++ b/docs/content/dev/webpack.md