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][recipes] rearrange and add new recipes on Pages and Layouts #15620

Merged
merged 8 commits into from
Jul 24, 2019

Conversation

marcysutton
Copy link
Contributor

Description

I added the new recipes for Pages and Layouts to get this docs train moving! This PR also includes some of the restructuring I proposed in previous issues (and in the recipe spreadsheet).

New recipes in this PR:

  • Gatsby Project Structure
  • Creating pages automatically
  • Creating pages from Markdown posts with createPage (bonus recipe!)
  • Creating pages without GraphQL
  • Creating a layout component

I also added a numbering system (1.1, 1.2, 2.1, etc.) since these are longer than I'd hoped to still be actionable on-page - that's a goal of these content pieces. I think the Table of Contents in #15251 will help a lot, too, and we could potentially add an expand/collapse component in the future to make the page easier to digest and scan.

Related Issues

@marcysutton marcysutton requested a review from a team July 11, 2019 02:43
Copy link
Contributor

@gillkyle gillkyle left a comment

Choose a reason for hiding this comment

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

Just saw an issue with the relative links in the Table of Contents, but I love that this gives a bunch of examples for other people working on recipes. 👍

docs/docs/recipes.md Outdated Show resolved Hide resolved
}
}
}
`).then(result => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Splitting hairs: the next example uses async/await, not sure one is preferred over the other or if that consistency really matters too much though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great point! We should update it. I forget where that example came from exactly, but I think it's in the docs somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed an update!

@marcysutton marcysutton requested a review from a team as a code owner July 23, 2019 01:43
Copy link
Contributor

@amberleyromo amberleyromo left a comment

Choose a reason for hiding this comment

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

I think this is much improved! Mainly a question about the TOC changes and broken anchor links.

docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
docs/docs/recipes.md Outdated Show resolved Hide resolved
pathPrefix: `/yourpathprefix`,
}
```
Starters are boilerplate Gatsby sites maintained officially, or by the community.
Copy link
Contributor

Choose a reason for hiding this comment

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

One more thing -- for some reason this is under ## Creating layouts and it should be under ## Working with starters (right below).

Not sure if there was other content you wanted to add for ## Creating layouts?

Copy link
Contributor

Choose a reason for hiding this comment

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

I pushed this change to your branch (15aa456), and went ahead and added the "Working with Themes" recipe in this PR as well (18178a9).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! That's a good place to start for themes - ultimately we'll want it to follow the new format though: https://www.gatsbyjs.org/contributing/docs-templates/#recipes

Copy link
Contributor

Choose a reason for hiding this comment

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

This is challenging. Should it be split into "Using a theme" and "Building a theme"?

Copy link
Contributor

Choose a reason for hiding this comment

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

merging as-is, will address later.

@amberleyromo amberleyromo added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Jul 24, 2019
@marcysutton marcysutton merged commit ec8371e into master Jul 24, 2019
@marcysutton marcysutton deleted the docs-recipes branch July 24, 2019 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
3 participants