From 2f462f90d4608763e5cb9618ec80d939a679fe2e Mon Sep 17 00:00:00 2001 From: oupala Date: Wed, 1 Jul 2020 11:52:17 +0200 Subject: style: linting markdown files Linting markdown files according to default remark-lint configuration. Files inside the `public` directory were not linted. Signed-off-by: oupala --- docs/guides/s3-image-upload.md | 51 ++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 29 deletions(-) (limited to 'docs/guides/s3-image-upload.md') diff --git a/docs/guides/s3-image-upload.md b/docs/guides/s3-image-upload.md index 7ca8dd12..cb3ae79f 100644 --- a/docs/guides/s3-image-upload.md +++ b/docs/guides/s3-image-upload.md @@ -1,19 +1,15 @@ -Guide - Setup CodiMD S3 image upload -=== +# Guide - Setup CodiMD S3 image upload **Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: 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 { @@ -32,16 +28,13 @@ Guide - Setup CodiMD S3 image upload 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 { @@ -62,23 +55,23 @@ Guide - Setup CodiMD S3 image upload 8. Edit `config.json` and set following keys: - ```javascript - { - "production": { - ... - "imageuploadtype": "s3", - "s3": { - "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", - "secretAccessKey": "YOUR_S3_ACCESS_KEY", - "region": "YOUR_S3_REGION" // example: ap-northeast-1 - }, - "s3bucket": "YOUR_S3_BUCKET_NAME" - } - } - ``` + ```javascript + { + "production": { + ... + "imageuploadtype": "s3", + "s3": { + "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", + "secretAccessKey": "YOUR_S3_ACCESS_KEY", + "region": "YOUR_S3_REGION" // example: ap-northeast-1 + }, + "s3bucket": "YOUR_S3_BUCKET_NAME" + } + } + ``` 9. In additional to edit `config.json` directly, you could also try [environment variables](../configuration-env-vars.md). ## Related Tools -* [AWS Policy Generator](http://awspolicygen.s3.amazonaws.com/policygen.html) +- [AWS Policy Generator](http://awspolicygen.s3.amazonaws.com/policygen.html) -- cgit v1.2.3