Juan
April 11, 2018, 9:37am
1
Since Ghost Channels are already in the works, maybe no need to vote them. Just to one ot the greatest upcoming Ghost features. Some info:
Very nice. Just look at this beauty:
https://github.com/TryGhost/Ghost/blob/master/core/server/services/channels/config.channels.json
Creating Custom Channels → This will allow big blogs to adopt Ghost.
1 Like
Tomas
April 11, 2018, 11:07am
4
I see this feature is marked as in-progress . Is there official Ghost roadmap available somewhere?
@Tomas I think you can consider this as a roadmap:
opened 04:26PM - 31 Mar 15 UTC
closed 09:53AM - 24 Apr 18 UTC
server / core
This is a WIP epic - I'm still working out the steps needed to get from A-B and … I'll break it down into sub tasks/sub issues as and when, in the meantime, the goal is clear and documented here.
---
The frontend of Ghost - that is the server side code which renders a blog using the active theme - has been somewhat unloved for a little while now. It essentially consists of some hard coded routes in `/routes/frontend.js`, which in turn call the monolithic functions in `/controllers/frontend.js`. It's time for this part of Ghost to be refactored into something more elegant, and importantly, something more extensible.
On the [wiki](https://github.com/TryGhost/Ghost/wiki/Channels-101) you'll find a new document, titled [Channels 101](https://github.com/TryGhost/Ghost/wiki/Channels-101), which introduces and explains the concept of Channels for the frontend. In short channels are the abstracted concept of a list of posts, i.e. the homepage, the tag archive, the author archive or any other group of posts you could conceive of.
And the very end of the document it talks about working to slowly remove hardcoded bits of the fontend and refactor it into configuration & generation code, before finally moving towards making channels a model & API endpoint just like Posts, Tags and Users.
This issue is the 'epic' where we'll keep track of our progress towards achieving this New World Order.
- [x] Refactor out the hardcoded slug keywords #4519
- [x] Convert sitemaps & rpc pings to use events #5069
- [x] Move RSS from frontend controller & refactor to use events
- [x] Move post-processing of author data out of the frontend controller #5159
- [x] Refactor frontend controller #5192
Need to solve:
- [x] Dynamic routing for channels
- [x] Pagination when in channel
- [ ] meta data for channels
- [ ] sitemap for channels
- [ ] Improve the channels API
Maybe later:
- [ ] ~~add a channel registration mechanism that works whilst Ghost is running~~
- [ ] ~~Support offset, rather than page, in the API #2896~~
- [ ] RSS feeds for each channel linked in that channel
- [ ] Post urls & next/prev post when in channel
-----
## Updates: Aug 2017
The current state of channels is that it the functionality is largely refactored and in place, but can only be accessed by modifying the core file `channels-config.js`. This is because, although the basics are working, advanced behaviour of Ghost isn't yet properly linked to channels.
Examples of missing pieces (some listed above) are:
- Sitemaps
- Meta data
- RSS feed (URLs only)
- Next/prev post when in a channel
- Deep customisation, e.g. disabling RSS feeds
There is also some pure-refactoring that needs to be done:
E.g.
- moving channels to a proper home
- moving non-channel pieces from controllers/frontend.js to a proper home
- strengthening the implementation to make channels more of a first class object
- better/clearer default configuration
- proper use of express
- exposing channels without core modification
Basically, we need to iron out a few more of the major pieces, and then expose this config. Short term, we're going to start publishing blog posts on how to use the functionality that is there by hacking core.
Hannah
April 11, 2018, 11:16am
6
@Tomas We don’t currently keep a public roadmap.
It’s worth being very aware that the current implementation of channels was a test, and it’s being rewritten, entirely, to be even more powerful and be configured with the much more human-friendly yaml format rather than json.
It is very much in the works though and we’ll probably use the forum to share progress when there’s something to alpha or beta test
3 Likes
Hannah
April 24, 2018, 9:59am
7
Here’s the official update on where we’re going with channels (now part of the Dynamic Routing spec):
opened 09:51AM - 24 Apr 18 UTC
closed 03:08PM - 02 Jan 19 UTC
server / core
feature
Refs: https://github.com/TryGhost/Ghost/issues/9528 (YAML Settings), https://git… hub.com/TryGhost/Ghost/issues/9192 (Routing re-write), https://github.com/TryGhost/Ghost/pull/9550 (Url Service).
## The what and why of dynamic routing
Ghost's Routing has always been almost entirely static and hard-coded. The only config we've offered is the option to add dates to permalinks, but that setting is probably my least favourite part of Ghost 😂
People close to the project will have heard a lot about a mysterious feature called "channels", which was an attempt to expose more configuration around lists of posts. This has been working behind the scenes, but we haven't been clear on how to expose the functionality: Apps? Config? UI?
Early this year we sat down and rethought routing from the ground up with a view to answering the following questions: How can we make it possible to solve all the common routing use cases? How do we expose functionality to our users? How does this fit in with Apps? And where the fuck do Channels fit into all of this?
Top 3 common use cases we want to solve:
1. custom home pages
2. rendering a taxonomy at a non-standard URL, e.g. /tag/recipes/ -> /category/recipes/
3. customising post collections e.g. removing posts with a certain tag, or using a different URL
There are 3 main problems we have with trying to reach these use cases:
- How to make routes enumerable and configurable
- Ability to generate sitemaps and other features that need to know about URLs rather than routes
- Resource <-> URL 2 way binding - get resource from URL, get URL for resource
We think we have the answers, however the theory is never quite the same as the practice. This issue represents our current thinking at the time of writing and is very subject to change!
## What's coming?
In https://github.com/TryGhost/Ghost/issues/9528 we added the ability to customise Ghost through YAML files that live in `content/settings`. The first file that will live here will be `routes.yaml`, and this will be the gateway to all things dynamic routing. This solve the configuration problem.
The solution to everything else is the introduction of a URL service and a huge rewrite of all the code that generates content for Ghost blogs 😅
**Beta Goals**
In the first beta version, by editing `content/settings/routes.yml` it will be possible to:
- Define a custom route that renders a specific template
- Define a custom home page
- Change the location of the standard collection of posts, e.g. so they all live at `/blog/*`.
- Change the URL for taxonomies e.g `/tag/:slug/` -> `/category/:slug/`
- Customise the main post collection (v1 has severe known limitations)
- Define new collections (v1 has severe known limitations)
Once the first beta goes out we will be looking for people to test their routing use-cases. At that point, we'll publish some documentation on how the default routes.yml file is structured and how to define custom routes and collections within the limitations.
**Tracked tasks**
- [x] YAML Settings #9528
- [x] Url Service rewrite #9550
- [x] Dynamic sitemap 100% working (https://github.com/TryGhost/Ghost/pull/9580)
- [x] Rework url utility https://github.com/TryGhost/Ghost/pull/9593
- [x] Routing re-write https://github.com/TryGhost/Ghost/pull/9596
- [x] render 503 if url service is processing (https://github.com/TryGhost/Ghost/pull/9588)
- [x] Resources have full 2-way binding https://github.com/TryGhost/Ghost/pull/9596
**Overall Goals**
This issue will be closed when we achieve the following:
- [x] Ship first beta version of dynamic routing
- [x] First version of channels (https://github.com/TryGhost/Ghost/pull/9686)
- [x] Resource path aliases with automatic redirects (Need a separate issue explaining this feature!)
- [x] Data key, order, limit, redirect
- [x] Disable rss (https://github.com/TryGhost/Ghost/pull/9693)
- [x] **Extracted**: disable sitemaps, disable pagination (https://github.com/TryGhost/Ghost/issues/10313)
- [x] **Extracted**: All hard-coded public routes (e.g. page) are configurable inc homepage (https://github.com/TryGhost/Ghost/issues/10312)
- [x] Add UI to upload+reload routes.yaml file (https://github.com/TryGhost/Ghost/issues/9744)
_Note: There are some extensions to the dynamic routing behaviour that are known but not covered by this issue, which include custom controllers and custom taxonomies_
💡 **Please direct all questions & discussion to the [forum](https://forum.ghost.org).** This issue will be used for collecting bugs & use cases once the beta goes out.
This is our current WIP feature. Happy to answer any questions here on the forum.
4 Likes
Please let us know when the beta will be available for testing , I would love to play with this feature and see how it works as I have several use cases I’m interested in. Thanks!
1 Like
Ayu
June 5, 2018, 7:38pm
9
finally it’s released and in beta and I have upgraded to it half an hour ago but I can’t find any options related to it in my ghost admin
It’s not configurable in the admin interface as of now - see this folder (you need to add a routes.yml configuration to your content/settings/
of your install)
1 Like
I checked that folder and I already have a routes.yml file there with the exact content from that linked folder above. What else needs to be done?
Ayu
June 5, 2018, 7:46pm
12
From what I understand, after you make changes to it and restart Ghost, your new routes should be implemented
/cc @Kate there hasn’t been an announcement for this in the forum (such as ✨ Koenig Editor - Beta Release - #39 by Kevin ) and I don’t know if there will be one, but since it’s hot off the press, I would wait a little bit before diving right into it - you might end up doing 3-4x the work to figure out how to use it when the details post is being written!
Here’s the relevant commit, with a really detailed commit message if you’re curious
Kate
June 6, 2018, 9:26am
14
Attention
If you are using the undocumented config.channels.json
file, we recommend to wait with updating your blog to 1.24.0. Dynamic routing beta is not yet feature-equivalent.
We will announce dynamic routing (beta) as soon as we are ready
Juan
August 21, 2018, 4:36pm
15
1 Like