[英]GatsbyJs, page inside folder
i read that gatsby create the proper page if you save items in the pages folder.如果您将项目保存在 pages 文件夹中,我读到 gatsby 会创建正确的页面。
Ex---->前---->
src/
pages/
Home.tsx
LandingPage.tsx
I can reach the page, for example at http://localhost:8000/LandingPage我可以访问该页面,例如http://localhost:8000/LandingPage
but what can i do if I have the following folder structure?但是如果我有以下文件夹结构,我该怎么办?
src/
pages/
Home/
index.tsx
LandingPage/
index.tsx
If you have the following folder structure:如果您具有以下文件夹结构:
src/
pages/
Home/
index.tsx
LandingPage/
index.tsx
You will get the following paths:您将获得以下路径:
http://localhost:8000/Home http://localhost:8000/Home
http://localhost:8000/LandingPage http://localhost:8000/LandingPage
You don't have to set anything else Gatsby figures it out for you by default.默认情况下,您不必设置任何其他 Gatsby 为您计算的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.