设置Gatsby博客分层URL条目结构 [英] Setting up Gatsby blog hierarchical URL slug structure
问题描述
我目前正在使用Gatsby Starter博客( https://github.com/gatsbyjs/gatsby-starter-blog )-我可以在本地运行此文件,而不会出现问题.
I am currently using the Gatsby Starter blog (https://github.com/gatsbyjs/gatsby-starter-blog) - I can get this running locally without issue.
但是我想更改URL结构-
However I want to change the URL structure -
当前,如果我撰写名为"hello world"的博客文章,则URL将为"www.example/hello-world".我希望这些网址采用"www.example/blog/hello-world"的形式.
currently if I make a blog post called 'hello world', then the URL will be 'www.example/hello-world'. I want the URLs to be in the form of 'www.example/blog/hello-world'.
我看过几篇有关更改gatsby-node.js中的设置的文章,但没有什么内容专门解决我的问题.我不清楚我需要更改什么,因为Gatsby链接API和Web开发对我来说还很陌生.
I've seen a few posts about changing settings in gatsby-node.js but nothing specifically addresses my issue. I am unclear what I need to change as both the Gatsby links API and web dev are fairly new to me.
推荐答案
您需要更改 查看全文