Change MDX Page URL TO Slugs In Gatsby
The [TODO: Code shorthand span ] creates URLs based off the directory structure of files. This is how to setup Gatsby with an [TODO: Code shorthand span ] directory that lets you put [TODO: Code shorthand span ] keys in the frontmatter to control the URL.
### Modules
bash
### src/layouts/blog - post - v1.js
javascript
;
;
;
;
const
### src/mdx - pages/example - dir/hello - world.mdx
title: Hey, MDX
date: February 15, 2021
slug: /hello-world-example-of-code
This is the [TODO: Code shorthand span ] file.
### gatsby - config.js
javascript
module.exports =
### gatsby - node.js
javascript