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