From 6dab69de605a7812d95ab22dcaf2d874fe9904d4 Mon Sep 17 00:00:00 2001 From: Simon C Date: Fri, 8 Jan 2021 14:58:01 +0100 Subject: docs: Fix indentation of code (cherry picked from commit 4559d52d521939739b0d3aad0c84e39d2aa5c960) Signed-off-by: David Mehren --- docs/content/guides/auth/nextcloud.md | 55 ++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 23 deletions(-) (limited to 'docs') diff --git a/docs/content/guides/auth/nextcloud.md b/docs/content/guides/auth/nextcloud.md index e0eb28d1..db13774d 100644 --- a/docs/content/guides/auth/nextcloud.md +++ b/docs/content/guides/auth/nextcloud.md @@ -1,8 +1,13 @@ # Authentication guide - Nextcloud (self-hosted) -*This has been constructed using the [Nextcloud OAuth2 Documentation](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/oauth2.html?highlight=oauth2) combined with [this issue comment on the nextcloud bugtracker](https://github.com/nextcloud/server/issues/5694#issuecomment-314761326).* +*This has been constructed using +the [Nextcloud OAuth2 Documentation](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/oauth2.html?highlight=oauth2) +combined +with [this issue comment on the nextcloud bugtracker](https://github.com/nextcloud/server/issues/5694#issuecomment-314761326) +.* -This guide uses the generic OAuth2 module for compatibility with Nextcloud 13 and above (this guide has been tested successfully with Nextcloud 14). +This guide uses the generic OAuth2 module for compatibility with Nextcloud 13 and above (this guide has been tested +successfully with Nextcloud 14 and Nextcloud 20). 1. Sign-in with an administrator account to your Nextcloud server @@ -18,35 +23,39 @@ This guide uses the generic OAuth2 module for compatibility with Nextcloud 13 an 4. You'll now see a line containing a *client identifier* and a *Secret*. ![Successfully added OAuth2-client](../../images/auth/nextcloud-oauth2-3-clientid-secret.png) -5. That's it for Nextcloud, the rest is configured in your HedgeDoc `config.json` or via the `CMD_` environment variables! +5. That's it for Nextcloud, the rest is configured in your HedgeDoc `config.json` or via the `CMD_` environment + variables! -6. Add the Client ID and Client Secret to your `config.json` file or pass them as environment variables. Make sure you also replace `` with the right domain name. +6. Add the Client ID and Client Secret to your `config.json` file or pass them as environment variables. Make sure you + also replace `` with the right domain name. - `config.json`: + ```javascript { "production": { "oauth2": { - "clientID": "ii4p1u3jz7dXXXXXXXXXXXXXXX", - "clientSecret": "mqzzx6fydbXXXXXXXXXXXXXXXX", - "authorizationURL": "https:///apps/oauth2/authorize", - "tokenURL": "https:///apps/oauth2/api/v1/token", - "userProfileURL": "https:///ocs/v2.php/cloud/user?format=json", - "userProfileUsernameAttr": "ocs.data.id", - "userProfileDisplayNameAttr": "ocs.data.display-name", - "userProfileEmailAttr": "ocs.data.email" + "clientID": "ii4p1u3jz7dXXXXXXXXXXXXXXX", + "clientSecret": "mqzzx6fydbXXXXXXXXXXXXXXXX", + "authorizationURL": "https:///apps/oauth2/authorize", + "tokenURL": "https:///apps/oauth2/api/v1/token", + "userProfileURL": "https:///ocs/v2.php/cloud/user?format=json", + "userProfileUsernameAttr": "ocs.data.id", + "userProfileDisplayNameAttr": "ocs.data.display-name", + "userProfileEmailAttr": "ocs.data.email" } } } ``` - - environment variables: - ```sh - CMD_OAUTH2_CLIENT_ID=ii4p1u3jz7dXXXXXXXXXXXXXXX - CMD_OAUTH2_CLIENT_SECRET=mqzzx6fydbXXXXXXXXXXXXXXXX - CMD_OAUTH2_AUTHORIZATION_URL=https:///apps/oauth2/authorize - CMD_OAUTH2_TOKEN_URL=https:///apps/oauth2/api/v1/token - CMD_OAUTH2_USER_PROFILE_URL=https:///ocs/v2.php/cloud/user?format=json - CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=ocs.data.id - CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=ocs.data.display-name - CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=ocs.data.email - ``` + - environment variables: + + ```sh + CMD_OAUTH2_CLIENT_ID=ii4p1u3jz7dXXXXXXXXXXXXXXX + CMD_OAUTH2_CLIENT_SECRET=mqzzx6fydbXXXXXXXXXXXXXXXX + CMD_OAUTH2_AUTHORIZATION_URL=https:///apps/oauth2/authorize + CMD_OAUTH2_TOKEN_URL=https:///apps/oauth2/api/v1/token + CMD_OAUTH2_USER_PROFILE_URL=https:///ocs/v2.php/cloud/user?format=json + CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=ocs.data.id + CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=ocs.data.display-name + CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=ocs.data.email + ``` -- cgit v1.2.3 From 1d92a8175565f758bf05bbeb92afcaf0d2fa5cd2 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 11 Jan 2021 11:53:28 +0100 Subject: Docs: Enable SuperFences extension This allows indented code blocks in lists Signed-off-by: David Mehren --- docs/mkdocs.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index fd090fe5..8a2228cc 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -44,6 +44,7 @@ nav: markdown_extensions: - toc: permalink: true + - pymdownx.superfences theme: name: 'material' language: en -- cgit v1.2.3 From 877bc26078c888abaf8bc73da38206ba4dd7b97a Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 11 Jan 2021 11:54:22 +0100 Subject: Docs: Replace `:smile` with actual 😃 emoji Signed-off-by: David Mehren --- docs/content/guides/auth/gitlab-self-hosted.md | 2 +- docs/content/guides/auth/saml-onelogin.md | 2 +- docs/content/guides/auth/saml.md | 5 +++-- docs/content/guides/auth/twitter.md | 2 +- docs/content/guides/minio-image-upload.md | 4 ++-- docs/content/guides/s3-image-upload.md | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/content/guides/auth/gitlab-self-hosted.md b/docs/content/guides/auth/gitlab-self-hosted.md index fc655ac5..1205b487 100644 --- a/docs/content/guides/auth/gitlab-self-hosted.md +++ b/docs/content/guides/auth/gitlab-self-hosted.md @@ -1,6 +1,6 @@ # GitLab (self-hosted) -*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind :smile: thanks! +*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks! 1. Sign in to your GitLab 2. Navigate to the application management page at `https://your.gitlab.domain/admin/applications` (admin permissions required) diff --git a/docs/content/guides/auth/saml-onelogin.md b/docs/content/guides/auth/saml-onelogin.md index 8b897c82..37a2a439 100644 --- a/docs/content/guides/auth/saml-onelogin.md +++ b/docs/content/guides/auth/saml-onelogin.md @@ -1,6 +1,6 @@ # Authentication guide - SAML (OneLogin) -**Note:** *This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind :smile: thanks!* +**Note:** *This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks!* 1. Sign-in or sign-up for an OneLogin account. (available free trial for 2 weeks) diff --git a/docs/content/guides/auth/saml.md b/docs/content/guides/auth/saml.md index 58a2ae45..80d7dfed 100644 --- a/docs/content/guides/auth/saml.md +++ b/docs/content/guides/auth/saml.md @@ -1,8 +1,9 @@ # Authentication guide - SAML -*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind :smile: thanks! +*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks! -The basic procedure is the same as the case of OneLogin which is mentioned in [OneLogin-Guide](./saml-onelogin.md). If you want to match your IdP, you can use more configurations as below. +The basic procedure is the same as the case of OneLogin which is mentioned in [OneLogin-Guide](./saml-onelogin.md). If +you want to match your IdP, you can use more configurations as below. - If your IdP accepts metadata XML of the service provider to ease configuration, use this url to download metadata XML. - {{your-serverurl}}/auth/saml/metadata diff --git a/docs/content/guides/auth/twitter.md b/docs/content/guides/auth/twitter.md index cbb8c865..b231a549 100644 --- a/docs/content/guides/auth/twitter.md +++ b/docs/content/guides/auth/twitter.md @@ -1,6 +1,6 @@ # Authentication guide - Twitter -*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind :smile: thanks! +*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks! 1. Sign-in or sign-up for a Twitter account diff --git a/docs/content/guides/minio-image-upload.md b/docs/content/guides/minio-image-upload.md index 41d9b14e..2a30b26b 100644 --- a/docs/content/guides/minio-image-upload.md +++ b/docs/content/guides/minio-image-upload.md @@ -1,6 +1,6 @@ # Minio Guide for HedgeDoc -*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind :smile: thanks! +*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks! 1. First of all you need to setup Minio itself. @@ -91,4 +91,4 @@ You could use a convenience script located in `bin/migrate_from_fs_to_minio`. Be careful, read carefully what it does, it was not tested in all environments. -Take it as an inspiration to make your own migration script. \ No newline at end of file +Take it as an inspiration to make your own migration script. diff --git a/docs/content/guides/s3-image-upload.md b/docs/content/guides/s3-image-upload.md index 3b041066..4bbc9bce 100644 --- a/docs/content/guides/s3-image-upload.md +++ b/docs/content/guides/s3-image-upload.md @@ -1,6 +1,6 @@ # Guide - Setup HedgeDoc S3 image upload -**Note:** *This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind :smile: thanks!* +**Note:** *This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks!* 1. Go to [AWS S3 console](https://console.aws.amazon.com/s3/home) and create a new bucket. ![create-bucket](../images/s3-image-upload/create-bucket.png) -- cgit v1.2.3 From 80d8cc79f6843bca557d882db32fae8c55ab425f Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 11 Jan 2021 12:00:33 +0100 Subject: Docs: Unify code block languages Use `yaml` for Dockerfiles, `shell` for environment variables and `json` for our config file. Signed-off-by: David Mehren --- docs/content/guides/auth/github.md | 6 +++--- docs/content/guides/auth/gitlab-self-hosted.md | 2 +- docs/content/guides/auth/keycloak.md | 2 +- docs/content/guides/auth/ldap-ad.md | 6 +++--- docs/content/guides/auth/mattermost-self-hosted.md | 2 +- docs/content/guides/auth/nextcloud.md | 2 +- docs/content/guides/auth/saml-keycloak.md | 2 +- docs/content/guides/auth/saml-onelogin.md | 4 ++-- docs/content/guides/auth/saml.md | 10 +++++----- docs/content/guides/auth/twitter.md | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) (limited to 'docs') diff --git a/docs/content/guides/auth/github.md b/docs/content/guides/auth/github.md index f540a530..72f95450 100644 --- a/docs/content/guides/auth/github.md +++ b/docs/content/guides/auth/github.md @@ -17,7 +17,7 @@ 6. Add the Client ID and Client Secret to your config.json file or pass them as environment variables - `config.json`: - ```js + ```json { "production": { "github": { @@ -29,7 +29,7 @@ ``` - environment variables: - ```sh + ```shell CMD_GITHUB_CLIENTID=3747d30eaccXXXXXXXXX CMD_GITHUB_CLIENTSECRET=2a8e682948eee0c580XXXXXXXXXXXXXXXXXXXXXX - ```` + ``` diff --git a/docs/content/guides/auth/gitlab-self-hosted.md b/docs/content/guides/auth/gitlab-self-hosted.md index 1205b487..d0d63ceb 100644 --- a/docs/content/guides/auth/gitlab-self-hosted.md +++ b/docs/content/guides/auth/gitlab-self-hosted.md @@ -15,7 +15,7 @@ 6. In the `docker-compose.yml` add the following environment variables to `app:` `environment:` -```Dockerfile +```yaml - CMD_DOMAIN=your.hedgedoc.domain - CMD_URL_ADDPORT=true - CMD_PROTOCOL_USESSL=true diff --git a/docs/content/guides/auth/keycloak.md b/docs/content/guides/auth/keycloak.md index 82f6d321..62bcfa60 100644 --- a/docs/content/guides/auth/keycloak.md +++ b/docs/content/guides/auth/keycloak.md @@ -30,7 +30,7 @@ You may note that a separate realm is specified throughout this tutorial. It is 5. In the `docker-compose.yml` add the following environment variables to `app:` `environment:` -```Dockerfile +```yaml CMD_OAUTH2_USER_PROFILE_URL=https://keycloak.example.com/auth/realms/your-realm/protocol/openid-connect/userinfo CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=preferred_username CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=name diff --git a/docs/content/guides/auth/ldap-ad.md b/docs/content/guides/auth/ldap-ad.md index b7d0284e..3f83a20a 100644 --- a/docs/content/guides/auth/ldap-ad.md +++ b/docs/content/guides/auth/ldap-ad.md @@ -2,14 +2,14 @@ To setup your HedgeDoc instance with Active Directory you need the following configs: -```env +```shell CMD_LDAP_URL=ldap://internal.example.com CMD_LDAP_BINDDN=cn=binduser,cn=Users,dc=internal,dc=example,dc=com -CMD_LDAP_BINDCREDENTIALS= +CMD_LDAP_BINDCREDENTIALS="" CMD_LDAP_SEARCHBASE=dc=internal,dc=example,dc=com CMD_LDAP_SEARCHFILTER=(&(objectcategory=person)(objectclass=user)(|(sAMAccountName={{username}})(mail={{username}}))) CMD_LDAP_USERIDFIELD=sAMAccountName -CMD_LDAP_PROVIDERNAME=Example Inc AD +CMD_LDAP_PROVIDERNAME="Example Inc AD" ``` `CMD_LDAP_BINDDN` is either the `distinguishedName` or the `userPrincipalName`. *This can cause "username/password is invalid" when either this value or the password from `CMD_LDAP_BINDCREDENTIALS` are incorrect.* diff --git a/docs/content/guides/auth/mattermost-self-hosted.md b/docs/content/guides/auth/mattermost-self-hosted.md index 2ad2afd7..02ca5d8f 100644 --- a/docs/content/guides/auth/mattermost-self-hosted.md +++ b/docs/content/guides/auth/mattermost-self-hosted.md @@ -24,7 +24,7 @@ This guide uses the generic OAuth2 module for compatibility with Mattermost vers 7. Add the Client ID and Client Secret to your config.json file or pass them as environment variables - `config.json`: - ```javascript + ```json { "production": { "oauth2": { diff --git a/docs/content/guides/auth/nextcloud.md b/docs/content/guides/auth/nextcloud.md index db13774d..7e1a2fb5 100644 --- a/docs/content/guides/auth/nextcloud.md +++ b/docs/content/guides/auth/nextcloud.md @@ -30,7 +30,7 @@ successfully with Nextcloud 14 and Nextcloud 20). also replace `` with the right domain name. - `config.json`: - ```javascript + ```json { "production": { "oauth2": { diff --git a/docs/content/guides/auth/saml-keycloak.md b/docs/content/guides/auth/saml-keycloak.md index 1bc3b363..eb0d9acd 100644 --- a/docs/content/guides/auth/saml-keycloak.md +++ b/docs/content/guides/auth/saml-keycloak.md @@ -107,7 +107,7 @@ The configured mappers should look like this: } ``` It you configure HedgeDoc with enviroment variables, these are the ones you have to set: -```bash +```shell CMD_SAML_ATTRIBUTE_USERNAME=username CMD_SAML_ATTRIBUTE_EMAIL=email ``` diff --git a/docs/content/guides/auth/saml-onelogin.md b/docs/content/guides/auth/saml-onelogin.md index 37a2a439..cbf31b73 100644 --- a/docs/content/guides/auth/saml-onelogin.md +++ b/docs/content/guides/auth/saml-onelogin.md @@ -34,7 +34,7 @@ 8. In your HedgeDoc server, create IdP certificate file from (A) 9. Add the IdP URL (B) and the Idp certificate file path to your config.json file or pass them as environment variables. - `config.json`: - ```javascript + ```json { "production": { "saml": { @@ -46,7 +46,7 @@ ``` - environment variables - ```sh + ```shell CMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/****** CMD_SAML_IDPCERT=/path/to/idp_cert.pem ``` diff --git a/docs/content/guides/auth/saml.md b/docs/content/guides/auth/saml.md index 80d7dfed..41e8cbaf 100644 --- a/docs/content/guides/auth/saml.md +++ b/docs/content/guides/auth/saml.md @@ -30,7 +30,7 @@ you want to match your IdP, you can use more configurations as below. ``` - environment variables - ```env + ```shell CMD_SAML_ISSUER=myhedgedoc CMD_SAML_IDENTIFIERFORMAT=urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified ``` @@ -46,7 +46,7 @@ you want to match your IdP, you can use more configurations as below. - *Note:* Default value of all attributes is NameID of SAML response, which is email address if `identifierFormat` is default. - `config.json`: - ```javascript + ```json { "production": { "saml": { @@ -62,7 +62,7 @@ you want to match your IdP, you can use more configurations as below. ``` - environment variables - ```sh + ```shell CMD_SAML_ATTRIBUTE_ID=sAMAccountName CMD_SAML_ATTRIBUTE_USERNAME=nickName CMD_SAML_ATTRIBUTE_EMAIL=mail @@ -77,7 +77,7 @@ you want to match your IdP, you can use more configurations as below. - *Note:* Evaluates `externalGroups` first - `config.json`: - ```javascript + ```json { "production": { "saml": { @@ -91,7 +91,7 @@ you want to match your IdP, you can use more configurations as below. ``` - environment variables - ```sh + ```shell CMD_SAML_GROUPATTRIBUTE=memberOf CMD_SAML_REQUIREDGROUPS=hedgedoc-users|board-members CMD_SAML_EXTERNALGROUPS=temporary-staff diff --git a/docs/content/guides/auth/twitter.md b/docs/content/guides/auth/twitter.md index b231a549..896b57b9 100644 --- a/docs/content/guides/auth/twitter.md +++ b/docs/content/guides/auth/twitter.md @@ -24,7 +24,7 @@ 7. Add your Consumer Key and Consumer Secret to your `config.json` file or pass them as environment variables: - `config.json`: - ```javascript + ```json { "production": { "twitter": { @@ -36,7 +36,7 @@ ``` - environment variables: - ```sh + ```shell CMD_TWITTER_CONSUMERKEY=esTCJFXXXXXXXXXXXXXXXXXXX CMD_TWITTER_CONSUMERSECRET=zpCs4tU86pRVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` -- cgit v1.2.3 From ee83c85eb03a004bce3e4eade01cada4c9ecb0b8 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 11 Jan 2021 12:03:48 +0100 Subject: SAML Auth Guide: Fix indentation Signed-off-by: David Mehren --- docs/content/guides/auth/saml.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'docs') diff --git a/docs/content/guides/auth/saml.md b/docs/content/guides/auth/saml.md index 41e8cbaf..d499b349 100644 --- a/docs/content/guides/auth/saml.md +++ b/docs/content/guides/auth/saml.md @@ -6,13 +6,14 @@ The basic procedure is the same as the case of OneLogin which is mentioned in [O you want to match your IdP, you can use more configurations as below. - If your IdP accepts metadata XML of the service provider to ease configuration, use this url to download metadata XML. - - {{your-serverurl}}/auth/saml/metadata - - *Note:* If not accessible from IdP, download to local once and upload to IdP. + - {{your-serverurl}}/auth/saml/metadata + - *Note:* If not accessible from IdP, download to local once and upload to IdP. - Change the value of `issuer`, `identifierFormat` to match your IdP. - `issuer`: A unique id to identify the application to the IdP, which is the base URL of your HedgeDoc as default - - `identifierFormat`: A format of unique id to identify the user of IdP, which is the format based on email address as default. It is recommend that you use as below. + - `identifierFormat`: A format of unique id to identify the user of IdP, which is the format based on email address as + default. It is recommend that you use as below. - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress (default) - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified @@ -37,13 +38,14 @@ you want to match your IdP, you can use more configurations as below. - Change mapping of attribute names to customize the displaying user name and email address to match your IdP. - `attribute`: A dictionary to map attribute names - + - `attribute.id`: A primary key of user table for your HedgeDoc - + - `attribute.username`: Attribute name of displaying user name on HedgeDoc - + - `attribute.email`: Attribute name of email address, which will be also used for Gravatar - - *Note:* Default value of all attributes is NameID of SAML response, which is email address if `identifierFormat` is default. + - *Note:* Default value of all attributes is NameID of SAML response, which is email address if `identifierFormat` + is default. - `config.json`: ```json @@ -68,12 +70,15 @@ you want to match your IdP, you can use more configurations as below. CMD_SAML_ATTRIBUTE_EMAIL=mail ``` -- If you want to control permission by group membership, add group attribute name and required group (allowed) or external group (not allowed). +- If you want to control permission by group membership, add group attribute name and required group (allowed) or + external group (not allowed). - `groupAttribute`: An attribute name of group membership - - `requiredGroups`: Group names array for allowed access to HedgeDoc. Use vertical bar to separate for environment variables. + - `requiredGroups`: Group names array for allowed access to HedgeDoc. Use vertical bar to separate for environment + variables. - - `externalGroups`: Group names array for not allowed access to HedgeDoc. Use vertical bar to separate for environment variables. + - `externalGroups`: Group names array for not allowed access to HedgeDoc. Use vertical bar to separate for environment + variables. - *Note:* Evaluates `externalGroups` first - `config.json`: -- cgit v1.2.3 From bf7d4ddcd85bd797b15f430543240af2a04afbba Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 11 Jan 2021 12:04:56 +0100 Subject: GitHub Auth Guide: Fix indentation Signed-off-by: David Mehren --- docs/mkdocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 8a2228cc..1560af46 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -21,11 +21,11 @@ nav: - OAuth: guides/auth/oauth.md - SAML : guides/auth/saml.md - SAML Keycloak : guides/auth/saml-keycloak.md - - SAML Onelogin : guides/auth/saml-onelogin.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 + - 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 -- cgit v1.2.3 From 512fc2a914ec433616f98dbe5b921b9a6c11aadc Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 11 Jan 2021 12:05:31 +0100 Subject: GitLab Auth Guide: Fix indentation Signed-off-by: David Mehren --- docs/content/guides/auth/gitlab-self-hosted.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'docs') diff --git a/docs/content/guides/auth/gitlab-self-hosted.md b/docs/content/guides/auth/gitlab-self-hosted.md index d0d63ceb..13a61a5b 100644 --- a/docs/content/guides/auth/gitlab-self-hosted.md +++ b/docs/content/guides/auth/gitlab-self-hosted.md @@ -6,25 +6,26 @@ 2. Navigate to the application management page at `https://your.gitlab.domain/admin/applications` (admin permissions required) 3. Click **New application** to create a new application and fill out the registration form: -![New GitLab application](../../images/auth/gitlab-new-application.png) + ![New GitLab application](../../images/auth/gitlab-new-application.png) 4. Click **Submit** -5. In the list of applications select **HackMD**. Leave that site open to copy the application ID and secret in the next step. +5. In the list of applications select **HackMD**. Leave that site open to copy the application ID and secret in the next + step. -![Application: HackMD](../../images/auth/gitlab-application-details.png) + ![Application: HackMD](../../images/auth/gitlab-application-details.png) 6. In the `docker-compose.yml` add the following environment variables to `app:` `environment:` -```yaml -- CMD_DOMAIN=your.hedgedoc.domain -- CMD_URL_ADDPORT=true -- CMD_PROTOCOL_USESSL=true -- CMD_GITLAB_BASEURL=https://your.gitlab.domain -- CMD_GITLAB_CLIENTID=23462a34example99XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -- CMD_GITLAB_CLIENTSECRET=5532e9dexamplXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -``` + ```yaml + - CMD_DOMAIN=your.hedgedoc.domain + - CMD_URL_ADDPORT=true + - CMD_PROTOCOL_USESSL=true + - CMD_GITLAB_BASEURL=https://your.gitlab.domain + - CMD_GITLAB_CLIENTID=23462a34example99XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + - CMD_GITLAB_CLIENTSECRET=5532e9dexamplXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + ``` 7. Run `docker-compose up -d` to apply your settings. 8. Sign in to your HedgeDoc using your GitLab ID: -![Sign in via GitLab](../../images/auth/gitlab-sign-in.png) + ![Sign in via GitLab](../../images/auth/gitlab-sign-in.png) -- cgit v1.2.3 From 1256eb3cd32d08634274c475f93d7fdb101df0f5 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Wed, 13 Jan 2021 17:53:57 +0100 Subject: Docs: Use extensions to make markdown parsing more like GFM Signed-off-by: David Mehren --- docs/mkdocs.yml | 2 ++ docs/requirements.txt | 1 + 2 files changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 1560af46..cffb6a81 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -44,7 +44,9 @@ nav: markdown_extensions: - toc: permalink: true + - pymdownx.highlight - pymdownx.superfences + - mdx_truly_sane_lists theme: name: 'material' language: en diff --git a/docs/requirements.txt b/docs/requirements.txt index 57d08e48..043febc1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ mkdocs==1.1.2 mkdocs-material==6.2.3 pymdown-extensions==8.1 +mdx_truly_sane_lists==1.2 -- cgit v1.2.3 From c8a7984fa430df3ce7d202d6653a3010585a0b2c Mon Sep 17 00:00:00 2001 From: David Mehren Date: Wed, 13 Jan 2021 19:36:45 +0100 Subject: Docs: Various formatting fixes Signed-off-by: David Mehren --- docs/content/guides/auth/gitlab-self-hosted.md | 2 +- docs/content/guides/auth/ldap-ad.md | 7 +++++-- docs/content/guides/auth/saml.md | 6 +++--- docs/content/guides/auth/twitter.md | 2 +- docs/content/guides/minio-image-upload.md | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/content/guides/auth/gitlab-self-hosted.md b/docs/content/guides/auth/gitlab-self-hosted.md index 13a61a5b..0ec5887a 100644 --- a/docs/content/guides/auth/gitlab-self-hosted.md +++ b/docs/content/guides/auth/gitlab-self-hosted.md @@ -1,6 +1,6 @@ # GitLab (self-hosted) -*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks! +**Note:** *This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks!* 1. Sign in to your GitLab 2. Navigate to the application management page at `https://your.gitlab.domain/admin/applications` (admin permissions required) diff --git a/docs/content/guides/auth/ldap-ad.md b/docs/content/guides/auth/ldap-ad.md index 3f83a20a..be8a0f37 100644 --- a/docs/content/guides/auth/ldap-ad.md +++ b/docs/content/guides/auth/ldap-ad.md @@ -12,9 +12,12 @@ CMD_LDAP_USERIDFIELD=sAMAccountName CMD_LDAP_PROVIDERNAME="Example Inc AD" ``` -`CMD_LDAP_BINDDN` is either the `distinguishedName` or the `userPrincipalName`. *This can cause "username/password is invalid" when either this value or the password from `CMD_LDAP_BINDCREDENTIALS` are incorrect.* +`CMD_LDAP_BINDDN` is either the `distinguishedName` or the `userPrincipalName`. +*This can cause "username/password is invalid" when either this value or the password from `CMD_LDAP_BINDCREDENTIALS` +are incorrect.* -`CMD_LDAP_SEARCHFILTER` matches on all users and uses either the email address or the `sAMAccountName` (usually the login name you also use to login to Windows). +`CMD_LDAP_SEARCHFILTER` matches on all users and uses either the email address or the `sAMAccountName` (usually the +login name you also use to login to Windows). *Only using `sAMAccountName` looks like this:* `(&(objectcategory=person)(objectclass=user)(sAMAccountName={{username}}))` diff --git a/docs/content/guides/auth/saml.md b/docs/content/guides/auth/saml.md index d499b349..9cc1f8ba 100644 --- a/docs/content/guides/auth/saml.md +++ b/docs/content/guides/auth/saml.md @@ -5,9 +5,9 @@ The basic procedure is the same as the case of OneLogin which is mentioned in [OneLogin-Guide](./saml-onelogin.md). If you want to match your IdP, you can use more configurations as below. -- If your IdP accepts metadata XML of the service provider to ease configuration, use this url to download metadata XML. - - {{your-serverurl}}/auth/saml/metadata - - *Note:* If not accessible from IdP, download to local once and upload to IdP. +- If your IdP accepts metadata XML of the service provider to ease configuration, use this url to download metadata XML: + `{{your-serverurl}}/auth/saml/metadata` + *Note:* If not accessible from IdP, download to local once and upload to IdP. - Change the value of `issuer`, `identifierFormat` to match your IdP. - `issuer`: A unique id to identify the application to the IdP, which is the base URL of your HedgeDoc as default diff --git a/docs/content/guides/auth/twitter.md b/docs/content/guides/auth/twitter.md index 896b57b9..22a6ee01 100644 --- a/docs/content/guides/auth/twitter.md +++ b/docs/content/guides/auth/twitter.md @@ -1,6 +1,6 @@ # Authentication guide - Twitter -*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks! +**Note:** *This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks!* 1. Sign-in or sign-up for a Twitter account diff --git a/docs/content/guides/minio-image-upload.md b/docs/content/guides/minio-image-upload.md index 2a30b26b..7e114362 100644 --- a/docs/content/guides/minio-image-upload.md +++ b/docs/content/guides/minio-image-upload.md @@ -1,6 +1,6 @@ # Minio Guide for HedgeDoc -*Note:* This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks! +**Note:** *This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 thanks!* 1. First of all you need to setup Minio itself. -- cgit v1.2.3 From eaa7a15615425e5d86fd987e8ab8ec72cf781d61 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Wed, 13 Jan 2021 20:30:32 +0100 Subject: Docs: Reorder navigation links Signed-off-by: David Mehren --- docs/mkdocs.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index cffb6a81..dcdd531a 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -19,20 +19,20 @@ nav: - 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: 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 + - MinIO: guides/minio-image-upload.md - S3: guides/s3-image-upload.md - - Setting Terms: guides/providing-terms.md + - Migrate from Etherpad: guides/migrate-etherpad.md + - Breaking Changes: guides/migrations-and-breaking-changes.md + - Terms of Use Setup: guides/providing-terms.md - Configuration: configuration.md - Developer: - 'Getting Started': dev/getting-started.md -- cgit v1.2.3