Docs: Unify code block languages

Use `yaml` for Dockerfiles, `shell` for environment variables and `json` for our config file.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-01-11 12:00:33 +01:00
parent 877bc26078
commit 80d8cc79f6
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
10 changed files with 20 additions and 20 deletions

View file

@ -17,7 +17,7 @@
6. Add the Client ID and Client Secret to your config.json file or pass them as environment variables 6. Add the Client ID and Client Secret to your config.json file or pass them as environment variables
- `config.json`: - `config.json`:
```js ```json
{ {
"production": { "production": {
"github": { "github": {
@ -29,7 +29,7 @@
``` ```
- environment variables: - environment variables:
```sh ```shell
CMD_GITHUB_CLIENTID=3747d30eaccXXXXXXXXX CMD_GITHUB_CLIENTID=3747d30eaccXXXXXXXXX
CMD_GITHUB_CLIENTSECRET=2a8e682948eee0c580XXXXXXXXXXXXXXXXXXXXXX CMD_GITHUB_CLIENTSECRET=2a8e682948eee0c580XXXXXXXXXXXXXXXXXXXXXX
```` ```

View file

@ -15,7 +15,7 @@
6. In the `docker-compose.yml` add the following environment variables to `app:` `environment:` 6. In the `docker-compose.yml` add the following environment variables to `app:` `environment:`
```Dockerfile ```yaml
- CMD_DOMAIN=your.hedgedoc.domain - CMD_DOMAIN=your.hedgedoc.domain
- CMD_URL_ADDPORT=true - CMD_URL_ADDPORT=true
- CMD_PROTOCOL_USESSL=true - CMD_PROTOCOL_USESSL=true

View file

@ -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:` 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_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_USERNAME_ATTR=preferred_username
CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=name CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=name

View file

@ -2,14 +2,14 @@
To setup your HedgeDoc instance with Active Directory you need the following configs: To setup your HedgeDoc instance with Active Directory you need the following configs:
```env ```shell
CMD_LDAP_URL=ldap://internal.example.com CMD_LDAP_URL=ldap://internal.example.com
CMD_LDAP_BINDDN=cn=binduser,cn=Users,dc=internal,dc=example,dc=com CMD_LDAP_BINDDN=cn=binduser,cn=Users,dc=internal,dc=example,dc=com
CMD_LDAP_BINDCREDENTIALS=<super secret password> CMD_LDAP_BINDCREDENTIALS="<super secret password>"
CMD_LDAP_SEARCHBASE=dc=internal,dc=example,dc=com CMD_LDAP_SEARCHBASE=dc=internal,dc=example,dc=com
CMD_LDAP_SEARCHFILTER=(&(objectcategory=person)(objectclass=user)(|(sAMAccountName={{username}})(mail={{username}}))) CMD_LDAP_SEARCHFILTER=(&(objectcategory=person)(objectclass=user)(|(sAMAccountName={{username}})(mail={{username}})))
CMD_LDAP_USERIDFIELD=sAMAccountName 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.* `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.*

View file

@ -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 7. Add the Client ID and Client Secret to your config.json file or pass them as environment variables
- `config.json`: - `config.json`:
```javascript ```json
{ {
"production": { "production": {
"oauth2": { "oauth2": {

View file

@ -30,7 +30,7 @@ successfully with Nextcloud 14 and Nextcloud 20).
also replace `<your-nextcloud-domain>` with the right domain name. also replace `<your-nextcloud-domain>` with the right domain name.
- `config.json`: - `config.json`:
```javascript ```json
{ {
"production": { "production": {
"oauth2": { "oauth2": {

View file

@ -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: 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_USERNAME=username
CMD_SAML_ATTRIBUTE_EMAIL=email CMD_SAML_ATTRIBUTE_EMAIL=email
``` ```

View file

@ -34,7 +34,7 @@
8. In your HedgeDoc server, create IdP certificate file from (A) 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. 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`: - `config.json`:
```javascript ```json
{ {
"production": { "production": {
"saml": { "saml": {
@ -46,7 +46,7 @@
``` ```
- environment variables - environment variables
```sh ```shell
CMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/****** CMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/******
CMD_SAML_IDPCERT=/path/to/idp_cert.pem CMD_SAML_IDPCERT=/path/to/idp_cert.pem
``` ```

View file

@ -30,7 +30,7 @@ you want to match your IdP, you can use more configurations as below.
``` ```
- environment variables - environment variables
```env ```shell
CMD_SAML_ISSUER=myhedgedoc CMD_SAML_ISSUER=myhedgedoc
CMD_SAML_IDENTIFIERFORMAT=urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified 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. - *Note:* Default value of all attributes is NameID of SAML response, which is email address if `identifierFormat` is default.
- `config.json`: - `config.json`:
```javascript ```json
{ {
"production": { "production": {
"saml": { "saml": {
@ -62,7 +62,7 @@ you want to match your IdP, you can use more configurations as below.
``` ```
- environment variables - environment variables
```sh ```shell
CMD_SAML_ATTRIBUTE_ID=sAMAccountName CMD_SAML_ATTRIBUTE_ID=sAMAccountName
CMD_SAML_ATTRIBUTE_USERNAME=nickName CMD_SAML_ATTRIBUTE_USERNAME=nickName
CMD_SAML_ATTRIBUTE_EMAIL=mail 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 - *Note:* Evaluates `externalGroups` first
- `config.json`: - `config.json`:
```javascript ```json
{ {
"production": { "production": {
"saml": { "saml": {
@ -91,7 +91,7 @@ you want to match your IdP, you can use more configurations as below.
``` ```
- environment variables - environment variables
```sh ```shell
CMD_SAML_GROUPATTRIBUTE=memberOf CMD_SAML_GROUPATTRIBUTE=memberOf
CMD_SAML_REQUIREDGROUPS=hedgedoc-users|board-members CMD_SAML_REQUIREDGROUPS=hedgedoc-users|board-members
CMD_SAML_EXTERNALGROUPS=temporary-staff CMD_SAML_EXTERNALGROUPS=temporary-staff

View file

@ -24,7 +24,7 @@
7. Add your Consumer Key and Consumer Secret to your `config.json` file or pass them as environment variables: 7. Add your Consumer Key and Consumer Secret to your `config.json` file or pass them as environment variables:
- `config.json`: - `config.json`:
```javascript ```json
{ {
"production": { "production": {
"twitter": { "twitter": {
@ -36,7 +36,7 @@
``` ```
- environment variables: - environment variables:
```sh ```shell
CMD_TWITTER_CONSUMERKEY=esTCJFXXXXXXXXXXXXXXXXXXX CMD_TWITTER_CONSUMERKEY=esTCJFXXXXXXXXXXXXXXXXXXX
CMD_TWITTER_CONSUMERSECRET=zpCs4tU86pRVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX CMD_TWITTER_CONSUMERSECRET=zpCs4tU86pRVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
``` ```