basic jekyll question
omarcostahamido opened this issue · 3 comments
this is me not knowing enough about jekyll.
I have made a new collection named _database
where i will host several pages. Now they are linked using the [[ ]]
technique, which works just fine on obsidian, but the problem is... they don't work on the live website!
I've added the collection on _config.yml
as such:
database:
output: true
but still no good. they just show up as [[ not linked yeah? ]]
with the brackets showing! (ugly much).
I've experimented enough (naively so, perhaps) to know that if I just make it a category, as in make the pages inside a database
folder instead of a _database
folder, it just works. 🤯
Now the problem is that I do need the collection feature because I want to be able to iterate through its items...
Sorry for noise. I appreciate if someone who knows their way around jekyll and this template could help me 🙏
Best,
to start hinting at an answer to myself, i think all the magic is on https://github.com/maximevaillancourt/digital-garden-jekyll-template/blob/main/_plugins/bidirectional_links_generator.rb
now, if only i could understand all of it...
Your last comment is correct: bidirectional_links_generator.rb
is indeed where the magic happens, specifically on this line:
The above works because I defined a collection named notes
here:
digital-garden-jekyll-template/_config.yml
Lines 30 to 33 in 40101f0
If you want to add a collection named database
, try changing the above to this:
collections:
notes:
output: true
permalink: /:slug
database:
output: true
permalink: /database/:slug
Then, in bidirectional_links_generator.rb
, update line 7 (from the first code snippet) to this:
all_notes = site.collections['notes'].docs + site.collections['datbase'].docs
Good luck!