Change Ghost Blog's Default Routing

混江龙づ霸主 提交于 2019-12-07 04:04:02

问题


Is there a way to change the default routing in Ghost?

I have created a blog using the ghost platform and changed the default theme from Casper to Ghostion. I then created four static pages about me, my portfolio, blog, and resume. Everything is working as it should.

Here is the problem Ghost by default passes all the blog articles to the index.hbs file. I would like to change this and have them passed to a custom blog.hbs file then when the user navigates to the /blog slug have the server serve the blog.hbs file instead of the default for static pages. Essentially, I want to move all blog post to the page dedicated for my blog instead of having them displayed on the home page of the site. I hope what I'm trying to achieve is clear.


回答1:


Currently this is not possible without modifying huge chunks of Ghost's core code, but it might be possible in future versions when plugin support arrives.




回答2:


This is now available in Ghost 2.0. You can change the default routing if you use Ghost 2.0.

Here is some documentation detailing the configuration: https://docs.ghost.org/docs/dynamic-routing



来源:https://stackoverflow.com/questions/22254950/change-ghost-blogs-default-routing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!