[Feature]: Upgrade & fix the chapterList feature
Description
The current chapterList feature accepts the following props:
chapterList: [
{
order: '',
title: "",
description: "",
},
]
However, when trying to use this for a real-world scenario - embedding content from the website, outside of a collection, into a collection - the feature did not help me, and in fact, didn't work as expected.
Main issues
- The
orderprop is meaningless. It is not taken into account when ordering content and instead, all posts added withchapterListare appended at the bottom, making the feature essentially useless for anything other than the only current usecase: A coming soon?as the value. - No
urlprop. Essentially, every entry is just a string that does not point to anything, and the lack of aurlprop makes it impossible to turn it into a link either.
Feature requests
- Allow the use of a single
urlprop to link to articles outside of collections.
The syntax for this would look as such:
chapterList: [
{
url: '/posts/understanding-the-dom'
// Extracts the title and snippet automatically
},
]
- When given a
url, all other props act as overrides.
This is a real need I ran into when attempting to link an article from outside a collection - something I think should be a native feature, as collections should, conceptually, be a global grouping feature as opposed to the author > collection hierarchy we currently have.
The idea is that, when writing an article, you may want to focus on SEO, and that drives the way you title and the descriptions you write in order to maximize that. But when attaching an article to a collection, the idea is to guide the reader, and provide context within the collection for the next chapter.
With this in mind, it would be useful if the title and description acted as overrides when a url is given. This would allow for contextual guidance / consistency with other chapters while maintaining the existing SEO.
Assigning this ticket to @Aaday321 per convo on our Discord
I can also work on this.