From 55d653a1a2046dcc90f675c75e0a2aa4164e6a86 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sun, 3 Jan 2021 16:00:25 +0100 Subject: started work on a mkdocs documentation for readthedocs.org Signed-off-by: Philip Molares --- docs/guides/index.md | 3 +++ docs/index.md | 7 +++++++ mkdocs.yml | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 docs/guides/index.md create mode 100644 docs/index.md create mode 100644 mkdocs.yml diff --git a/docs/guides/index.md b/docs/guides/index.md new file mode 100644 index 00000000..25d4d949 --- /dev/null +++ b/docs/guides/index.md @@ -0,0 +1,3 @@ +## Guides + +In this section we try to provide you with some step-by-step guides for common scenarios to configure HedgeDoc to your needs. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..e00a1d10 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,7 @@ +# Welcome to the HedgeDoc Documentation + +This page should help you host and configure your own HedgeDoc instance. + +We provide: +- [Guides for common scenarios](guides/index.md) + diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..dfe74d43 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,38 @@ +site_name: HedgeDoc +site_url: https://docs.hedgedoc.org +nav: + - Home: index.md + - Setup: + - 'Manual Installation': setup/manual-setup.md + - 'Reverse Proxy': setup/reverse-proxy.md + - Docker: setup/docker.md + - Kubernetes: setup/kubernetes.md + - Cloudron: setup/cloudron.md + - Heroku: setup/heroku.md + - LinuxServer: setup/docker-linuxserver.md + - Yunohost: setup/yunohost.md + - Guides: + - Authentication: + - LDAP: guides/auth/ldap-ad.md + - OAuth: guides/auth/oauth.md + - SAML : guides/auth/saml.md + - SAML Keycloak : guides/auth/saml-keycloak.md + - SAML Onelogin : guides/auth/saml-onelogin.md + - GitHub: guides/auth/github.md + - GitLab: guides/auth/gitlab-self-hosted.md + - Keycloak: guides/auth/keycloak.md + - NextCloud: guides/auth/nextcloud.md + - Twitter: guides/auth/twitter.md + - Migrate from Etherpad: guides/migrate-etherpad.md + - Breaking Changes: guides/migrations-and-breaking-changes.md + - Media Backend: + - Minion: guides/minio-image-upload.md + - S3: guides/s3-image-upload.md + - Setting Terms: guides/providing-terms.md + - Configuration: configuration.md + - Developer: + - API: dev/api.md + - 'Developer Notes': dev/getting-started.md + - 'Operational Transformation': dev/ot.md + - Webpack: dev/webpack.md +theme: readthedocs -- cgit v1.2.3 From 0911bf96e96c6bd4afefe4be58da3d63e2e2c226 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sun, 3 Jan 2021 22:15:12 +0100 Subject: added all necessary configs to use structor see https://github.com/traefik/structor Signed-off-by: Philip Molares --- docs/guides/index.md | 3 --- docs/images/favicon.png | 1 + docs/images/logo.png | 1 + docs/index.md | 20 ++++++++++++++++---- mkdocs.requirements.txt | 3 +++ mkdocs.yml | 23 +++++++++++++++++++++-- 6 files changed, 42 insertions(+), 9 deletions(-) delete mode 100644 docs/guides/index.md create mode 120000 docs/images/favicon.png create mode 120000 docs/images/logo.png create mode 100644 mkdocs.requirements.txt diff --git a/docs/guides/index.md b/docs/guides/index.md deleted file mode 100644 index 25d4d949..00000000 --- a/docs/guides/index.md +++ /dev/null @@ -1,3 +0,0 @@ -## Guides - -In this section we try to provide you with some step-by-step guides for common scenarios to configure HedgeDoc to your needs. diff --git a/docs/images/favicon.png b/docs/images/favicon.png new file mode 120000 index 00000000..2b0c8015 --- /dev/null +++ b/docs/images/favicon.png @@ -0,0 +1 @@ +../../public/icons/favicon-32x32.png \ No newline at end of file diff --git a/docs/images/logo.png b/docs/images/logo.png new file mode 120000 index 00000000..22e855a9 --- /dev/null +++ b/docs/images/logo.png @@ -0,0 +1 @@ +../../public/icons/android-chrome-512x512.png \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index e00a1d10..fb6f2cb8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,7 +1,19 @@ # Welcome to the HedgeDoc Documentation -This page should help you host and configure your own HedgeDoc instance. +![HedgeDoc Logo](images/hedgedoc_logo_horizontal.png) -We provide: -- [Guides for common scenarios](guides/index.md) - +HedgeDoc lets you create real-time collaborative markdown notes. You can test-drive +it by visiting our [HedgeDoc demo server][hedgedoc-demo]. + +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](history.md) or [you can have a look at an explanitory graph over at our website][hedgedoc-history]. + +If you have any questions that aren't answered here, feel free to ask us on [Matrix][matrix.org-url], stop by our [community forums][hedgedoc-community] or have a look at our [FAQ][hedgedoc-faq]. + + +[hedgedoc-demo]: https://demo.hedgedoc.org +[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 \ No newline at end of file diff --git a/mkdocs.requirements.txt b/mkdocs.requirements.txt new file mode 100644 index 00000000..57d08e48 --- /dev/null +++ b/mkdocs.requirements.txt @@ -0,0 +1,3 @@ +mkdocs==1.1.2 +mkdocs-material==6.2.3 +pymdown-extensions==8.1 diff --git a/mkdocs.yml b/mkdocs.yml index dfe74d43..3728a036 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,8 +1,11 @@ site_name: HedgeDoc site_url: https://docs.hedgedoc.org +repo_url: https://github.com/hedgedoc/hedgedoc +site_description: 'HedgeDoc Documentation' +site_author: 'HedgeDoc Developers' nav: - Home: index.md - - Setup: + - Installation: - 'Manual Installation': setup/manual-setup.md - 'Reverse Proxy': setup/reverse-proxy.md - Docker: setup/docker.md @@ -35,4 +38,20 @@ nav: - 'Developer Notes': dev/getting-started.md - 'Operational Transformation': dev/ot.md - Webpack: dev/webpack.md -theme: readthedocs + - FAQ: https://hedgedoc.org/faq +markdown_extensions: + - toc: + permalink: true +theme: + name: 'material' + language: en + favicon: images/favicon.png + logo: images/logo.png + palette: + scheme: preference + primary: 'red' + accent: 'red' + features: + - navigation.tabs + - navigation.sections + - toc.integrate -- cgit v1.2.3 From 825d56f2168595e3ab28c6bd438c1701c7cebfbf Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Mon, 4 Jan 2021 13:11:41 +0100 Subject: removed kubernetes from navigation Signed-off-by: Philip Molares --- mkdocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 3728a036..76f87097 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -9,7 +9,6 @@ nav: - 'Manual Installation': setup/manual-setup.md - 'Reverse Proxy': setup/reverse-proxy.md - Docker: setup/docker.md - - Kubernetes: setup/kubernetes.md - Cloudron: setup/cloudron.md - Heroku: setup/heroku.md - LinuxServer: setup/docker-linuxserver.md -- cgit v1.2.3 From 90371c1c000ccfe884f165273ee8f4e459f0307f Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Mon, 4 Jan 2021 14:26:39 +0100 Subject: added documentation about how the write, build and deploy this documentation. Signed-off-by: Philip Molares --- .gitignore | 2 ++ docs/dev/documentation.md | 27 +++++++++++++++++++++++++++ docs/dev/getting-started.md | 2 +- mkdocs.yml | 3 ++- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 docs/dev/documentation.md diff --git a/.gitignore b/.gitignore index a31c3148..9528746e 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ public/views/build public/uploads/* !public/uploads/.gitkeep + +site/ diff --git a/docs/dev/documentation.md b/docs/dev/documentation.md new file mode 100644 index 00000000..aa3c5253 --- /dev/null +++ b/docs/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` 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. \ No newline at end of file diff --git a/docs/dev/getting-started.md b/docs/dev/getting-started.md index b0623926..b7787117 100644 --- a/docs/dev/getting-started.md +++ b/docs/dev/getting-started.md @@ -1,4 +1,4 @@ -# Developer Notes +# Getting started ## Preparing for running the code diff --git a/mkdocs.yml b/mkdocs.yml index 76f87097..562f87ff 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -33,10 +33,11 @@ nav: - Setting Terms: guides/providing-terms.md - Configuration: configuration.md - Developer: + - 'Getting Started': dev/getting-started.md - API: dev/api.md - - 'Developer Notes': dev/getting-started.md - 'Operational Transformation': dev/ot.md - Webpack: dev/webpack.md + - 'Documentation': dev/documentation.md - FAQ: https://hedgedoc.org/faq markdown_extensions: - toc: -- cgit v1.2.3