Skip to content

Commit

Permalink
Bring back images
Browse files Browse the repository at this point in the history
  • Loading branch information
nishantdania committed Aug 12, 2020
1 parent 9764747 commit d1a420d
Show file tree
Hide file tree
Showing 8 changed files with 362 additions and 13 deletions.
17 changes: 16 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,23 @@ module.exports = {
path: `${__dirname}/src/wiki`,
},
},
`gatsby-transformer-remark`,
`gatsby-transformer-sharp`,
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
// It's important to specify the maxWidth (in pixels) of
// the content container as this plugin uses this as the
// base for generating different widths of each image.
maxWidth: 650,
},
},
],
},
},
`gatsby-transformer-yaml`,
`gatsby-plugin-sharp`,
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"gatsby-plugin-sharp": "^2.6.14",
"gatsby-plugin-sitemap": "^2.4.11",
"gatsby-plugin-styled-components": "^3.3.10",
"gatsby-remark-images": "^3.3.21",
"gatsby-remark-images": "^3.3.25",
"gatsby-source-filesystem": "^2.3.14",
"gatsby-transformer-remark": "^2.8.25",
"gatsby-transformer-sharp": "^2.5.7",
Expand Down
Binary file added src/images/posts/bucket-policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/posts/create-bucket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/posts/request-aws-cert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/posts/static-hosting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Click `Next`. You don't need to edit anything in the second screen. Click `Next`

Grant public access by removing all the restrictions as shown:

![](../images/posts/create-bucket.png)

Click `Next` and then `Create Bucket`.

Click on the bucket you just created to enter its settings.
Expand All @@ -33,6 +35,8 @@ Click on the `Properties` tab on the top and then click on `Static website hosti

Choose the `Use this bucket to host a website` option, type `index.html` in the Index Document field, note down the endpoint for later and click `Save`:

![](../images/posts/static-hosting.png)

Click on the `Permissions` tab and then on `Bucket Policy` and type the following policy (Replace the `aotd.co` with your domain name):

```
Expand All @@ -52,6 +56,8 @@ Click on the `Permissions` tab and then on `Bucket Policy` and type the followin

Click `Save`:

![](../images/posts/bucket-policy.png)

That's it. You now have an S3 bucket setup to serve public files. Lets add SSL to this domain with CloudFront and Certificate Manager.

# Create an SSL certificate for https
Expand All @@ -66,6 +72,8 @@ Click `Request a certificate`.

Enter your domain name and click `Add another name to this certificate`.

![](../images/posts/request-aws-cert.png)

Enter ASTERISK.YOUR_DOMAIN (e.g \*.aotd.co).

Click `Next`
Expand Down
Loading

0 comments on commit d1a420d

Please sign in to comment.