Starting Ghost: Custom homepage

Starting Ghost: Custom homepage
Photo by Markus Winkler / Unsplash

If you want a blog/newsletter archive on your site, but don't want it to BE your site, you need a routes.yaml file.  Here's an example:

    template: page
    data: page.home

    permalink: /writing/{slug}/
    template: index
    filter: tag:blog
    permalink: /newsletter/{slug}/
    template: index
    filter: tag:newsletter

This example serves a page with the slug 'home' at  (You can set up your page's slug by pulling out the side editing menu.  Or feel free to change it (second line).

This example has two collections - one for blog posts, that have a tag "blog" and another for newsletter posts, that have a tag "newsletter".  You can change the URLs (permalink lines) or the tags (filter lines) easily.  For this setup, posts need to be tagged either newsletter or blog or they won't show up either place.  (Or both, in which case they'll show up in both places!)

Since visitors are going to land on your homepage, you'll probably want to go to Settings > Navigation and add entries for /newsletter and /writing so that they can find your content.

After you edit your routes.yaml file to make it exactly how you want it, go to Settings > Labs to upload it.  (Scroll down for routes.)  Note that spaces matter in routes.yaml - everything indented is indented exactly two or four spaces. No tabs.