Closed goulvench closed 1 year ago
Extra questions:
taxonomy_types
return a list of [term, resources]
instead of [term, tagged_resources]
? collect(&:resource)
is enough to get around that but it's unexpected. But maybe that's because I'm using an internal API, if the collection restriction is lifted this should no longer be the case.CSS
is not equal to Css
nor css
.collections: tags: permalink: latin
in bridgetown.config.yml
but it doesn't get picked up.Not trying to be picky here, just sharing things that I couldn't find reading the docs or code.
@goulvench This would appear to be a duplicate of https://github.com/bridgetownrb/bridgetown/issues/730. Can you copy any additional context here you'd like to share to comments on that issue? Thanks!
The more I read the docs, the less I'm sure if this is a bug or feature. Feel free to turn into an issue if that's the case. Using
Bridgetown v1.2.0 (codename "Bonny Slope")
Summary
Prototype pages are great, but should not be constrained by collections. The docs explain that prototype can be restricted to collections, which would imply that it's not mandatory, but the code enforces it.
Motivation
There are 3 collections on my blog, all using tags, and sometimes the tags overlap. I want to list all tags on a single page, and list all associated resources on each (prototype'd) tag page.
Guide-level explanation
It would simply be a matter of removing
collection: posts
in the "Simple usage" paragraph. Easy peasy!Reference-level explanation
Since the collection key is currently mandatory, all existing code is backwards-compatible.
I was able to create a page that lists all tags, using the following:
And a prototype page for each collection. Here's the one for posts, all other have exactly the same contents except the
collection:
name in frontmatter.