Move docs into subdirectory to make mkdocs work in a subdirectory

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Tilman Vatteroth 2021-01-04 13:07:44 +01:00
parent d52d1d255a
commit eaeb88401d
No known key found for this signature in database
GPG key ID: DEBDB3F34641B019
94 changed files with 62 additions and 45 deletions

View file

@ -14,7 +14,7 @@ It is inspired by Hackpad, Etherpad and similar collaborative editors. This
project originated with the team at [HackMD](https://hackmd.io) and now forked
into its own organisation. [A longer writeup can be read in the history doc](docs/history.md).
[![HedgeDoc 1.7.0 with its feature demonstration page open](docs/images/HedgeDoc-1.7.0-features.png)][hedgedoc-demo-features]
[![HedgeDoc 1.7.0 with its feature demonstration page open](public/screenshot.png)][hedgedoc-demo-features]
## Community and Contributions

View file

@ -4,9 +4,9 @@ You can choose to configure HedgeDoc with either a config file or with environme
Environment variables take precedence over configurations from the config files. They generally start with `CMD_` for our own options, but we also list node-specific options you can configure this way.
- Environment variables are processed in [`lib/config/environment.js`](../lib/config/environment.js) - so this is the first place to look if anything is missing not obvious from this document. The default values are defined in [`lib/config/default.js`](../lib/config/default.js), in case you wonder if you even need to override it.
- Environment variables are processed in [`lib/config/environment.js`](https://github.com/hedgedoc/hedgedoc/tree/master/lib/config/environment.js) - so this is the first place to look if anything is missing not obvious from this document. The default values are defined in [`lib/config/default.js`](https://github.com/hedgedoc/hedgedoc/tree/master/lib/config/default.js), in case you wonder if you even need to override it.
- The config file is processed in [`lib/config/index.js`](../lib/config/index.js) - so this is the first place to look if anything is missing not obvious from this document. The default values are defined in [`lib/config/default.js`](../lib/config/default.js), in case you wonder if you even need to override it. To get started, it is a good idea to take the `config.json.example` and copy it
- The config file is processed in [`lib/config/index.js`](https://github.com/hedgedoc/hedgedoc/tree/master/lib/config/index.js) - so this is the first place to look if anything is missing not obvious from this document. The default values are defined in [`lib/config/default.js`](https://github.com/hedgedoc/hedgedoc/tree/master/lib/config/default.js), in case you wonder if you even need to override it. To get started, it is a good idea to take the `config.json.example` and copy it
to `config.json` before filling in your own details.
**Note:** *Due to the rename process we renamed all `HMD_`-prefix variables to be `CMD_`-prefixed. The old ones continue to work.*

View file

@ -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"}`.

View file

@ -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.

View file

@ -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

View file

@ -70,7 +70,7 @@
}
```
9. In additional to edit `config.json` directly, you could also try [environment variables](../configuration-env-vars.md).
9. In additional to edit `config.json` directly, you could also try [environment variables](../configuration.md).
## Related Tools

View file

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View file

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View file

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View file

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 203 KiB

View file

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View file

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View file

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View file

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 177 KiB

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View file

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 177 KiB

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View file

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View file

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View file

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 234 KiB

View file

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View file

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

View file

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View file

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View file

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View file

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 187 KiB

View file

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.6 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1564" height="1564" clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" d="M781.965 0l-79.182 79.19-94.818-59.575-59.574 94.81-105.7-36.99-36.982 105.7-111.283-12.54-12.535 111.276-111.278 12.535 12.541 111.278-105.71 36.988 36.984 105.695-94.815 59.574 59.582 94.832L0 781.961l79.19 79.2-59.577 94.823 94.815 59.573-36.985 105.695 105.707 36.99-12.537 111.264 111.278 12.543 12.535 111.275 111.283-12.535 36.982 105.686 105.694-36.97 59.582 94.821 94.9-59.64 79.096 78.36 79.1-78.343 94.908 59.631 59.572-94.824 105.707 36.988 36.98-105.697 111.284 12.533 12.533-111.283 111.285-12.533-12.543-111.276 105.705-36.99-36.988-105.705 94.814-59.574-59.574-94.813 79.19-79.2-79.188-79.18 59.572-94.813-94.814-59.578 36.99-105.703-105.7-36.983 12.534-111.281-111.275-12.535-12.543-111.283-111.274 12.535-36.99-105.703-105.69 36.986-59.591-94.815-94.82 59.579zm0 77.785l71.305 71.307 85.394-53.656 53.666 85.384 95.172-33.302 33.31 95.185 100.206-11.289 11.296 100.217 100.205 11.289-11.287 100.213 95.182 33.3-33.309 95.188 85.385 53.654-53.648 85.381 71.312 71.309-71.31 71.318 11.666 18.569 41.978 66.812-85.383 53.647 33.311 95.193-95.195 33.31 11.297 100.205-100.215 11.288-11.287 100.216-100.215-11.287-33.301 95.182-95.193-33.31-53.649 85.394-85.289-53.588-18.094 17.922a106.956 106.956 0 0121.871 16.893c-.309 41.33-33.914 74.76-75.33 74.76-41.417 0-75.016-33.42-75.324-74.76a106.994 106.994 0 0122.069-17.01l-17.997-17.828-85.293 53.601-53.65-85.38-95.18 33.29-33.302-95.175-100.217 11.287-11.287-100.205-100.21-11.297 11.29-100.197-95.194-33.311 33.307-95.184-85.385-53.646 53.649-85.39-71.31-71.32 71.32-71.312-53.659-85.4 85.385-53.65-33.305-95.18 95.198-33.313-11.293-100.205 100.207-11.289 11.289-100.207 100.215 11.293 33.302-95.183 95.184 33.308 53.648-85.38 85.391 53.65z" color="#000" font-weight="400" font-family="sans-serif" clip-rule="nonzero" overflow="visible" fill="#fff" fill-rule="nonzero"/><path d="M528.81 636.127c-145.441 0-263.341 117.905-263.341 263.342 0 76 32.23 144.43 83.72 192.49l357.635 357.443c19.257-19.156 45.746-30.984 74.996-30.984 29.295 0 55.839 11.871 75.1 31.09l348.266-348.49c52.88-49.77 92.25-120 92.25-200.1 0-145.437-117.9-263.34-263.34-263.34-72.24 0-137.68 29.112-185.252 76.225l-.033-.035-67.096 67.101-54.863-54.863c-48.267-55.067-119.07-89.88-198.041-89.88zm107.461 300.662c31.804 0 57.57 25.77 57.57 57.57s-25.766 57.569-57.57 57.569c-31.787 0-57.558-25.769-57.558-57.569 0-31.8 25.771-57.57 57.558-57.57zm291.944 0c31.8 0 57.57 25.77 57.57 57.57s-25.77 57.569-57.57 57.569c-31.79 0-57.567-25.769-57.567-57.569 0-31.8 25.777-57.57 57.567-57.57zm-146.27 587.695l.024.023.023-.023h-.047z" fill="#fff" fill-rule="nonzero"/><path d="M674.097 985.728c0 8.82-7.146 15.94-15.95 15.94-8.808 0-15.958-7.12-15.958-15.94 0-8.81 7.15-15.96 15.958-15.96 8.804 0 15.95 7.15 15.95 15.96m291.938 0c0 8.82-7.15 15.94-15.95 15.94-8.81 0-15.96-7.12-15.96-15.94 0-8.81 7.15-15.96 15.96-15.96 8.8 0 15.95 7.15 15.95 15.96" fill="#fffffa" fill-rule="nonzero"/></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View file

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View file

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View file

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View file

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View file

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View file

@ -1,6 +1,6 @@
# Welcome to the HedgeDoc Documentation
![HedgeDoc Logo](images/hedgedoc_logo_horizontal.png)
![HedgeDoc Logo](images/hedgedoc_logo_horizontal.svg)
HedgeDoc lets you create real-time collaborative markdown notes. You can test-drive
it by visiting our [HedgeDoc demo server][hedgedoc-demo].
@ -16,4 +16,4 @@ If you have any questions that aren't answered here, feel free to ask us on [Mat
[hedgedoc-history]: https://hedgedoc.org/history
[hedgedoc-faq]: https://hedgedoc.org/faq
[matrix.org-url]: https://chat.hedgedoc.org
[hedgedoc-community]: https://community.hedgedoc.org
[hedgedoc-community]: https://community.hedgedoc.org

View file

@ -12,7 +12,7 @@
[LinuxServer.io](https://linuxserver.io) have created an Ubuntu-based multi-arch container image for x86-64, arm64 and armhf.
- It supports all the environment variables detailed in the [configuration documentation](../configuration-env-vars.md) to modify it according to your needs.
- It supports all the environment variables detailed in the [configuration documentation](../configuration.md) to modify it according to your needs.
- It gets rebuilt on new releases from HedgeDoc and also weekly if necessary to update any other package changes in the underlying container, making it easy to keep your HedgeDoc instance up to date.
- It also details how to easily [utilize Docker networking to reverse proxy](https://github.com/linuxserver/docker-hedgedoc/#application-setup) HedgeDoc using their [SWAG docker image](https://github.com/linuxserver/docker-swag)

View file

@ -0,0 +1,14 @@
[data-md-color-primary=hedgedoc] {
--md-primary-fg-color: #b51f08;
--md-primary-fg-color--light: #b51f08;
--md-primary-fg-color--dark: #b51f08;
--md-primary-bg-color: hsla(0, 0%, 100%, 1);
--md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);
}
[data-md-color-accent=hedgedoc] {
--md-accent-fg-color: #b51f08;
--md-accent-fg-color--transparent: hsla(348, 100%, 55%, 0.1);
--md-accent-bg-color: hsla(0, 0%, 100%, 1);
--md-accent-bg-color--light: hsla(0, 0%, 100%, 0.7);
}

View file

@ -1,27 +0,0 @@
# Documentation
Our documentation is build with [mkdocs](https://www.mkdocs.org).
## Writing
All documentation files are found in the `docs` directory of the [hedgedoc/hedgedoc repo](https://github.com/hedgedoc/hedgedoc). These files are just normal markdown files with nothing special about them.
The config file for mkdocs lies in the root of the repo 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:
1. make sure you have python3 installed
2. install all the dependencies possibly with a [venv](https://docs.python.org/3/library/venv.html):
`pip install -r mkdocs.requirements.txt`
3. start the mkdocs dev server `mkdocs serve` or let it 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*` and build each one seperatly via `mkdocs` by first installing `mkdocs.requirements.txt` and then building. Afterwards the menu go template is used to include a version switcher in the theme and make all the different versions available.

View file

@ -1 +0,0 @@
../../public/screenshot.png

View file

@ -1 +0,0 @@
../../public/icons/favicon-32x32.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View file

@ -1 +0,0 @@
../../public/icons/android-chrome-512x512.png

View file

@ -3,6 +3,7 @@ site_url: https://docs.hedgedoc.org
repo_url: https://github.com/hedgedoc/hedgedoc
site_description: 'HedgeDoc Documentation'
site_author: 'HedgeDoc Developers'
docs_dir: content
nav:
- Home: index.md
- Installation:
@ -46,12 +47,15 @@ theme:
name: 'material'
language: en
favicon: images/favicon.png
logo: images/logo.png
logo: images/logo.svg
palette:
scheme: preference
primary: 'red'
accent: 'red'
scheme: light
primary: 'hedgedoc'
accent: 'hedgedoc'
features:
- navigation.tabs
- navigation.sections
- toc.integrate
extra_css:
- theme/styles/hedgedoc-color.css