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: add a title to code snippets in the first part of the tutorial #7867

Merged
merged 5 commits into from
Sep 5, 2018

Conversation

DSchau
Copy link
Contributor

@DSchau DSchau commented Sep 4, 2018

Addresses #5608

Note: there is more to do here, i.e. actually copy these titles over to relevant tutorial pages, but I think this is a start.

Here's what it ends up looking like.

screen shot 2018-09-04 at 10 25 52 am

Will want to fix/externalize the padding/media query stuff. That feels a little janky.

@@ -206,17 +206,17 @@ export default () => (

In the browser, the “About Gatsby” header text should now be replaced with “This is a header.” But we don’t want the “About” page to say “This is a header.” We want it to say, “About Gatsby”.

4. Head back to `/src/components/header.js`, and make the following change:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed these from absolute paths to relative. Good idea or bad idea? If nothing else, we should be consistent throughout the docs and throughout the tutorial.

borderTopLeftRadius: 8,
borderTopRightRadius: 8,
color: `white`,
fontFamily:
Copy link
Contributor

Choose a reason for hiding this comment

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

you can also get our font families from

monospaceFontFamily: [
e.g. typography.options.monospaceFontFamily.join(",")

)}`,
},
},
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be abstracted so codeblock title could be used in blog posts as well? Not high priority, but would be nice if it's easy to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I should probably just add it in the src/util/typography file instead of at the component level! I'll do that tonight probably.

@DSchau
Copy link
Contributor Author

DSchau commented Sep 5, 2018

@pieh this is ready if you wanna take another gander 👀

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

LGTM! Let's merge this in, we can always iterate on it later on!

@pieh pieh merged commit 2e6c67e into gatsbyjs:master Sep 5, 2018
@DSchau DSchau deleted the docs-titles branch September 5, 2018 14:34
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.

3 participants