Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document plugin options #338

Open
robinmetral opened this issue Jul 28, 2019 · 0 comments
Open

Document plugin options #338

robinmetral opened this issue Jul 28, 2019 · 0 comments

Comments

@robinmetral
Copy link

Hi @jessestuart, thanks a lot for the great plugin!

Just a suggestion here: would you mind updating the README for the plugin options, namely this part:

{
  resolve: 'gatsby-source-s3-image',
  options: {
    bucketName: 'jesse.pics',
    domain: null, // [optional] Not necessary to define for AWS S3; defaults to `s3.amazonaws.com`
    protocol: 'https', // this defaults to https
  },
}

I've had to go look at the source to figure out essential options like region and accessKeyId.

Here they are, essentially:

export interface SourceS3Options {
// NOTE: Required params.
accessKeyId: string
secretAccessKey: string
bucketName: string
// Defaults to `${bucketName}.s3.amazonaws.com`, but may be overridden to
// e.g., support CDN's (such as CloudFront), or any other S3-compliant API
// (such as DigitalOcean Spaces.)
domain?: string
region?: string
// Defaults to HTTP.
protocol?: string
}

And as far as I understand them:

  • accessKeyId: not required if public, does the plugin work with a private bucket? See No nodes created by this plugin #332
  • secretAccessKey: not required if public ❓
  • bucketName: required ✔️
  • domain: defaults to s3.amazonaws.com ✔️
  • region: defaults to us-east-1, change for other regions
  • protocol: defaults to http (not https!), change for https

Let me know if you'd prefer a PR, but I thought you might want to handle the README yourself 🙂

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant