styxlab / gatsby-theme-try-ghost

A Gatsby theme to build flaring fast blogs from headless Ghost CMS
MIT License
135 stars 56 forks source link

Using ghost channels #241

Closed bassel closed 3 years ago

bassel commented 3 years ago

Is there a way to create channels similar to the ones that can be created using the ghost routes.yaml configurations?

So basically something similar to how collections are currently configured in this theme but that follows the concept of channels in ghost (queries the posts that match the filter without having any effect on their url or where they live)

styxlab commented 3 years ago

There is currently no native support of channels in gatsby-theme-try-ghost. While channels have their use cases, it's actually quite hard to get SEO right. The danger is that you publish the same article on different channels which can hit your SEO ranking badly, if not done right.

With the current gatsby-theme-try-ghost you can use collections to make one channel. If you need more channels you can run multiple instances of gatsby-theme-try-ghost. As you can point each instance to the same Ghost CMS, you still only have one source of truth for your content.

As an alternative and depending on your requirements, you may also be able to replicate channels with your reverse proxy (e.g. nginx), provided that you are hosting your site on your own servers.

bassel commented 3 years ago

In my specific use case I was thinking of creating a collection for my portfolio items then use channels to create separate routes for each type of projects. Your suggestion of using multiple instances of the theme seems like a good way to do it, so I'll play around with it and see how it goes.

Thank you for the detailed answer!