Slug in blog article template
Qtaza opened this issue · comments
Hi!
I don't understand, why blog article template constains slug fileld. This slug is not used anything.
I see that 'gatsby-node.js' has this fragment:
postsAndPages.forEach(edge => {
const id = edge.node.id
createPage({
path: edge.node.fields.slug,
tags: edge.node.frontmatter.tags,
component: path.resolve(
`src/templates/${String(edge.node.frontmatter.templateKey)}.js`
),
// additional data can be passed via context
context: {
id,
},
})
})
4 line using edge.node.fields.slug
from fields
array.
fields.slug
return file-name, not the slug field.
Please give me more description of this slug field.
@Qtaza it's something that I was planning to add but haven't yet gotten around to implementing, will be working on it soon.