diff --git a/docs/content/configuration.md b/docs/content/configuration.md index 06ea7ab0..74a1dc1b 100644 --- a/docs/content/configuration.md +++ b/docs/content/configuration.md @@ -44,7 +44,7 @@ to work.* | `dbURL` | `CMD_DB_URL` | **`undefined`**, `postgres://username:password@localhost:5432/hedgedoc`, `mysql://username:password@localhost:3306/hedgedoc`, or `sqlite:///path/to/hedgedoc.db` | Set the db in URL style. If set, then the relevant `db` config entries will be overridden. | | `loglevel` | `CMD_LOGLEVEL` | **`info`**, `debug` ... | Defines what kind of logs are provided to stdout. Available options: `debug`, `verbose`, `info`, `warn`, `error` | | `forbiddenNoteIDs` | `CMD_FORBIDDEN_NOTE_IDS` | **`['robots.txt', 'favicon.ico', 'api', 'build', 'css', 'docs', 'fonts', 'js', 'uploads', 'vendor', 'views']`**, `['robots.txt']` or `'robots.txt'` | disallow creation of notes, even if `allowFreeUrl` or `CMD_ALLOW_FREEURL` is `true` | -| `imageUploadType` | `CMD_IMAGE_UPLOAD_TYPE` | **`filesystem`**, `imgur`, `s3`, `minio`, `azure`, `lutim` | Where to upload images. For S3, see our Image Upload Guides for [S3](guides/s3-image-upload.md) or [Minio](guides/minio-image-upload.md), also there's a whole section on their respective env vars below. | +| `imageUploadType` | `CMD_IMAGE_UPLOAD_TYPE` | **`filesystem`**, `imgur`, `s3`, `minio`, `azure`, `lutim` | Where to upload images. For S3, see our Image Upload Guides for [S3](guides/media/s3-image-upload.md) or [Minio](guides/media/minio-image-upload.md), also there's a whole section on their respective env vars below. | | `sourceURL` | `CMD_SOURCE_URL` | **no default**, `https://github.com/hedgedoc/hedgedoc/tree/` | Provides the link to the source code of HedgeDoc on the entry page (Please, make sure you change this when you run a modified version) | | `tooBusyLag` | `CMD_TOOBUSY_LAG` | **`70`** | CPU time for one event loop tick until node throttles connections. (milliseconds) | | `staticCacheTime` | | **`1 * 24 * 60 * 60 * 1000`** | static file cache time | @@ -273,7 +273,7 @@ you don't have to use either of these. | config file | environment | **default** and example value | description | |-----------------|----------------------------|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------| -| `s3` | | `{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION" }` | When `imageuploadtype` be set to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](guides/s3-image-upload.md) | +| `s3` | | `{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION" }` | When `imageuploadtype` be set to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](guides/media/s3-image-upload.md) | | | `CMD_S3_ACCESS_KEY_ID` | **no default** | AWS access key id | | | `CMD_S3_SECRET_ACCESS_KEY` | **no default** | AWS secret key | | | `CMD_S3_REGION` | **no default**, `ap-northeast-1` | AWS S3 region | @@ -299,7 +299,7 @@ you don't have to use either of these. | config file | environment | **default** and example value | description | |-------------|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| -| `minio` | | `{ "accessKey": "YOUR_MINIO_ACCESS_KEY", "secretKey": "YOUR_MINIO_SECRET_KEY", "endpoint": "YOUR_MINIO_HOST", port: 9000, secure: true }` | When `imageUploadType` is set to `minio`, you need to set this key. Also check out our [Minio Image Upload Guide](guides/minio-image-upload.md) | +| `minio` | | `{ "accessKey": "YOUR_MINIO_ACCESS_KEY", "secretKey": "YOUR_MINIO_SECRET_KEY", "endpoint": "YOUR_MINIO_HOST", port: 9000, secure: true }` | When `imageUploadType` is set to `minio`, you need to set this key. Also check out our [Minio Image Upload Guide](guides/media/minio-image-upload.md) | | | `CMD_MINIO_ACCESS_KEY` | **no default** | Minio access key | | | `CMD_MINIO_SECRET_KEY` | **no default** | Minio secret key | | | `CMD_MINIO_ENDPOINT` | **no default**, `minio.example.org` | Address of your Minio endpoint/instance | diff --git a/docs/content/guides/minio-image-upload.md b/docs/content/guides/media/minio-image-upload.md similarity index 85% rename from docs/content/guides/minio-image-upload.md rename to docs/content/guides/media/minio-image-upload.md index 7e114362..e89163ba 100644 --- a/docs/content/guides/minio-image-upload.md +++ b/docs/content/guides/media/minio-image-upload.md @@ -21,22 +21,22 @@ docker logs test-minio ``` - ![docker logs](../images/minio-image-upload/docker-logs.png) + ![docker logs](../../images/minio-image-upload/docker-logs.png) 3. Open and login with the shown credentials. - ![minio default view](../images/minio-image-upload/default-view.png) + ![minio default view](../../images/minio-image-upload/default-view.png) 4. Create a bucket for HedgeDoc - ![minio create bucket](../images/minio-image-upload/create-bucket.png) + ![minio create bucket](../../images/minio-image-upload/create-bucket.png) 5. Add a policy for the prefix `uploads` and make it read-only. - ![minio edit policy](../images/minio-image-upload/open-edit-policy.png) + ![minio edit policy](../../images/minio-image-upload/open-edit-policy.png) *Open policy editor* - ![minio policy adding](../images/minio-image-upload/create-policy.png) + ![minio policy adding](../../images/minio-image-upload/create-policy.png) *Add policy for uploads* 6. Set credentials and configs for Minio in HedgeDoc's `config.json` diff --git a/docs/content/guides/s3-google-cloud-storage.md b/docs/content/guides/media/s3-google-cloud-storage.md similarity index 99% rename from docs/content/guides/s3-google-cloud-storage.md rename to docs/content/guides/media/s3-google-cloud-storage.md index 36f6cf22..03e42dc0 100644 --- a/docs/content/guides/s3-google-cloud-storage.md +++ b/docs/content/guides/media/s3-google-cloud-storage.md @@ -75,4 +75,4 @@ CMD_S3_BUCKET="your-bucket-name" The access key and secret key are the values you received when you enabled the interoperability feature. -After restarting HedgeDoc you should now be able to add images to your pages. \ No newline at end of file +After restarting HedgeDoc you should now be able to add images to your pages. diff --git a/docs/content/guides/s3-image-upload.md b/docs/content/guides/media/s3-image-upload.md similarity index 80% rename from docs/content/guides/s3-image-upload.md rename to docs/content/guides/media/s3-image-upload.md index 4bbc9bce..16f66c31 100644 --- a/docs/content/guides/s3-image-upload.md +++ b/docs/content/guides/media/s3-image-upload.md @@ -3,13 +3,13 @@ **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) + ![create-bucket](../../images/s3-image-upload/create-bucket.png) 2. Click on bucket, select **Properties** on the side panel, and find **Permission** section. Click **Edit bucket policy**. - ![bucket-property](../images/s3-image-upload/bucket-property.png) + ![bucket-property](../../images/s3-image-upload/bucket-property.png) 3. Enter the following policy, replace `bucket_name` with your bucket name: - ![bucket-policy-editor](../images/s3-image-upload/bucket-policy-editor.png) + ![bucket-policy-editor](../../images/s3-image-upload/bucket-policy-editor.png) ```json { @@ -28,13 +28,13 @@ 4. Go to IAM console and create a new IAM user. Remember your user credentials(`key`/`access token`) 5. Enter user page, select **Permission** tab, look at **Inline Policies** section, and click **Create User Policy** - ![iam-user](../images/s3-image-upload/iam-user.png) + ![iam-user](../../images/s3-image-upload/iam-user.png) 6. Select **Custom Policy** - ![custom-policy](../images/s3-image-upload/custom-policy.png) + ![custom-policy](../../images/s3-image-upload/custom-policy.png) 7. Enter the following policy, replace `bucket_name` with your bucket name: - ![review-policy](../images/s3-image-upload/review-policy.png) + ![review-policy](../../images/s3-image-upload/review-policy.png) ```json { @@ -70,7 +70,7 @@ } ``` -9. In additional to edit `config.json` directly, you could also try [environment variables](../configuration.md). +9. In additional to edit `config.json` directly, you could also try [environment variables](../../configuration.md). ## Related Tools diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 3f26695f..3a813b73 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -30,9 +30,9 @@ nav: - Authelia: guides/auth/authelia.md - Microsoft Entra ID (Azure AD): guides/auth/entra-id.md - Media Backend: - - MinIO: guides/minio-image-upload.md - - S3: guides/s3-image-upload.md - - Google Cloud Storage: guides/s3-google-cloud-storage.md + - MinIO: guides/media/minio-image-upload.md + - S3: guides/media/s3-image-upload.md + - Google Cloud Storage: guides/media/s3-google-cloud-storage.md - Migrate from Etherpad: guides/migrate-etherpad.md - Migration Troubleshooting: guides/migration-troubleshooting.md - Terms of Use Setup: guides/providing-terms.md