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

Docs update #39

Merged
merged 3 commits into from
Mar 6, 2018
Merged

Docs update #39

merged 3 commits into from
Mar 6, 2018

Conversation

linusmarco
Copy link
Contributor

Background

As I suggested in #30, the format of the documentation in the README needs to be changed to allow for the growing number of configuration settings. I think it's also a good idea to lay out a more formal set of guidelines/processes for issues and PRs (basically codifying and fleshing out what @fernando-mc laid out in a comment on #37).

Proposed changes

  1. Reworks the format of the API documentation in README.md
  2. Adds example configurations in the examples folder
  3. Adds a CONTRIBUTING document
  4. Adds a PULL_REQUEST_TEMPLATE.md and an ISSUE_TEMPLATE.md

Also, @fernando-mc had expressed concern about how to structure nested options. I would suggest that we deal with that by providing docs 'sections' only for top-level options, and specifying sup-option definitions in the same section like so (example for object headers PR):


objectHeaders

optional, no default

custom:
  client:
    ...
    objectHeaders:
      ALL_OBJECTS:
        - headerName: [header-name]
          headerValue: [header-value]
        ...
      specific-directory/:
        - headerName: [header-name]
          headerValue: [header-value]
        ...
      specific-file.ext:
        - headerName: [header-name]
          headerValue: [header-value]
        ...
      ... [more file- or folder-specific rules]
    ...

Use the objectHeaders option to set HTTP response headers be sent to clients requesting uploaded files from your website.

Headers may be specified globally for all files in the bucket by adding a headerName, headerValue pair to the ALL_OBJECTS property of the objectHeaders option. They may also be specified for specific folders or files within your site by specifying properties with names like specific-directory/ (trailing slash required to indicate folder) or specific-file.ext, where the folder and/or file paths are relative to distributionFolder.

Headers with more specificity will take precedence over more general ones. For instance, if 'Cache-Control' was set to 'max-age=100' in ALL_OBJECTS and to 'max-age=500' in my/folder/, the files in my/folder/ would get a header of 'Cache-Control: max-age=500'.


Proposed reviewers (optional)

@fernando-mc
Copy link
Owner

@linusmarco Looks good. Merging. We can continue to iterate on docs as needed.

@fernando-mc fernando-mc merged commit aac2ec2 into fernando-mc:master Mar 6, 2018
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

Successfully merging this pull request may close these issues.

2 participants