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: gatsby for apps - auth and client only routes #19551

Merged
merged 19 commits into from
Nov 21, 2019

Conversation

gillkyle
Copy link
Contributor

Description

This PR is an incremental improvement for the recommendations made in #18993 for the Building Apps with Gatsby workflow.

The two main changes are in:

  • Adding Authentication guide
  • Client-only Routes reference guide

Rationale for Adjustments

The Adding Authentication guide mostly just related to the client only routes guide and linked out to the other guides, deferring to explain authentication to the other guides. To update that, I added a diagram about what happens to get authentication info from another service to give an overview on that page which seems like it should serve as more of an overview.

The Client-only Routes guide added more detail on why they are needed and how they are implemented. It also extended the diagrams on the overview page to show the hybrid style approach that an app with authentication requires.

Other small changes

The example for simple auth was updated a little bit, renaming some things and updating links back to the right doc.

Screenshots

Adding Authentication

localhost_8000_docs_building-a-site-with-authentication_

Client-only Routes & User Authentication

localhost_8000_docs_client-only-routes-and-user-authentication_ (1)

Related Issues

Relates to #18993

@gillkyle gillkyle requested review from a team as code owners November 15, 2019 17:50
@gillkyle gillkyle added the type: documentation An issue or pull request for improving or updating Gatsby's documentation label Nov 15, 2019
@gillkyle gillkyle added this to In progress in Documentation Roadmap via automation Nov 15, 2019
@gillkyle gillkyle changed the title Docs/gatsby for apps auth docs: gatsby for apps - auth and client only routes Nov 15, 2019
@gillkyle gillkyle moved this from In progress to Parking lot in Documentation Roadmap Nov 15, 2019
@gillkyle gillkyle moved this from Parking lot to PRs for Review in Documentation Roadmap Nov 15, 2019
Copy link
Contributor

@muescha muescha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestions

docs/docs/building-a-site-with-authentication.md Outdated Show resolved Hide resolved
docs/docs/client-only-routes-and-user-authentication.md Outdated Show resolved Hide resolved
docs/docs/client-only-routes-and-user-authentication.md Outdated Show resolved Hide resolved
@laurieontech
Copy link
Contributor

Lots of great stuff here @gillkyle! Think this is going to be an important addition to the docs. I'm considering whether we should change some of the headers or further break out the pages, but let me noodle on it a bit. Overall it's in really good shape.

laurieontech
laurieontech previously approved these changes Nov 20, 2019
Copy link
Contributor

@laurieontech laurieontech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a tiny change, but think this is good to go!

docs/docs/client-only-routes-and-user-authentication.md Outdated Show resolved Hide resolved
@gillkyle gillkyle added the status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response label Nov 20, 2019
@laurieontech laurieontech merged commit ed5f991 into master Nov 21, 2019
Documentation Roadmap automation moved this from PRs for Review to Done Nov 21, 2019
@delete-merged-branch delete-merged-branch bot deleted the docs/gatsby-for-apps-auth branch November 21, 2019 15:56
Comment on lines +1043 to 1060
} else if (node.internal.type === `CreatorsYaml`) {
// Creator pages
const validTypes = {
individual: `people`,
agency: `agencies`,
company: `companies`,
}

if (!validTypes[node.type]) {
throw new Error(
`Creators must have a type of “individual”, “agency”, or “company”, but invalid type “${node.type}” was provided for ${node.name}.`
)
}
slug = `/creators/${validTypes[node.type]}/${slugify(node.name, {
lower: true,
})}`
createNodeField({ node, name: `slug`, value: slug })
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code block was removed in #19495 Remove creator showcase

we should remove it again?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open new issue #19738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants