问题
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