- write an article for what i've customised for my gatsby site
- content in my head at the moment
- dark mode
- plugin-emoji
- reorg on the article types
- plugin-caption (wip)
- rss feed
- content in my head at the moment
[Added 14 Sept 2019]
- parameters that's available from
pageQuery
, comes fromcontext
whencreatePage({})
. eg:
// gatsby-node.js
createPage({
context: {
slug: '123',
foo: 'bar',
}
})
// template/blog-post.js
export const pageQuery = graphql`
query BlogPostBySlug($slug: String!, $foo: String!) {
}
`
if you are creating
slug
from page url, and it contains<space>
characters, you might need to doslug.replace(/\s+/g, '-')
as browser willencodeUriComponent
of your path, and the slug may not match.graphql aliases https://graphql.org/learn/queries/#aliases
- allows you to rename the result field