I recreated the home page, kind of.
As I have been working on this blog I noticed that adding personal updates by way of one, ever increasing page, might not be the best way to approach things.
How to make a page that features posts from a new category (eg: Dialogue) and have them render in a page that acts like the home page (but isn't) and also excludes them from the home page?
Do they have their own little blog. A blog, within a blog, kind of.
I built a Content Collection.
Basically, a content collection is it's very own curation that lies within the overall loop, but doesn't interfere with everything else.
A bit like an introvert. A code introvert, that is.
Updating the Routes file.
The default routes file for Ghost has three main sections: routes, collections, and taxonomies. Where the basic code is:
routes:
collections:
/:
permalink: /{slug}/
template: index
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/To create my introvert and give them a home, I needed to add a new route and define a few simple parameters:
collections:
/dialogue/:
permalink: /dialogue/{slug}/
template: dialogue
filter: tag:dialogue
/:
permalink: /{slug}/
template: index
filter: tag:-[dialogue]Did it work?
Yes, I think so. What I have now is:
- A new collection, called
dialogue - A new set of
permalinksthat call for thedialogue collection(and then the name of the post) - A new template (called
Dialogue) to make it distinct from the home page. - And a set of
filtersthat show that collectionfilter: tag:dialogueon the new page, and hide that collectionfilter: tag:-[dialogue]on the home page.
There's always a sense of tension when updating raw code files. Something as small as one space can throw the entire site down.
Note to self: Don't use TextEdit, use VS Code from now on.