Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Gatsby来写cms网站,像栏目列表页面和文章详情页面如何生成? #13150

Closed
tgy3300 opened this issue Apr 5, 2019 · 1 comment

Comments

@tgy3300
Copy link

tgy3300 commented Apr 5, 2019

如题:使用Gatsby来写一个博客网站,像栏目列表页面和文章详情页面如何生成的?

比如我的博客网站数据如下
栏目表【column】有3条数据如下:
id---------title
1---------php笔记
2---------java笔记
3---------javascript笔记

文章表【 article】(article.tid = column.id)有3条数据如下:
id---------title----------------------tid
1----------php笔记1---------------1
2----------java笔记1---------------2
3----------javascript笔记1---------3

现在网站的栏目页面有3个,这3个页面是通过id来访问的,访问地址如下:
http://www.aaa.com/column/1.html
http://www.aaa.com/column/2.html
http://www.aaa.com/column/3.html

问题:网站栏目的这3个页面,在Gatsby中,我只需要写一个页面,然后通过接收url参数来动态获取相应数据展示出来即可

通过gatsby build打包后,这些动态的栏目页面会被生成为html文件放在网站的某个目录下吗?,如果会根据数据来全部生成对应的html页面文件,哪每次在网站后台增/删/改栏目或者文章时,是不是都要执行gatsby build重新打包,然后再重新上传到网站服务器上?

@LekoArts
Copy link
Contributor

LekoArts commented Apr 5, 2019

Hello, thank you for opening this issue!

We would really like to help you with your problem/question but we don't understand your language and therefore kindly ask you to write in the English language. Google Translate can only help a bit and in the end it would be a frustrating guessing game for both parties.

Please feel free to open a new issue (in English) and we'd be happy to help you then 💜

Thank you for using Gatsby!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants