Open jkornblum opened 6 years ago
@jkornblum carefull you miss a semi-column ^^
gatsby-node.js:39:97
✖ 39:97 Missing semicolon.
You can run npm run lint:js
to be sure (normally it's automaticly done in a git hook with husky) 😉
Thanks for feedback. I tried the one liner without the checks! I was burned 😄
Anyways I updated and cleaned up code, added unit test, and changed one markdown file use the frontmatter slug.
Let me know if it looks okay.
It looks good, I just need to check why netlify don't want to deploy ^^
8:29:44 AM: error Generating JavaScript bundles failed
8:29:44 AM:
8:29:44 AM: Error: /opt/build/repo/node_modules/@types/react/index.d.ts
8:29:44 AM: (3508,58): error TS2304: Cannot find name 'HTMLDialogElement'.
8:29:44 AM:
Strange… I look this after, really thank you for your PR 👍
Modify
gatsby-node.js
so that it reads in frontmatter slug and uses it for blog URL. If frontmatter is not defined or slug is not defined it will default to file path for slug (current behavior).E.g. on the demo the first blog post is
demo.com/blog/2017-04-18--welcoming/
by addingslug
to front matter likethe new url would be
demo.com/blog/2017-04-18/my-article