Is there any idea how to make a glossary website using a ghost custom theme? I am using a custom theme and I want to make a glossary website for my website.
So it looks to me like you could do that with Ghost. Youād want one term per blog post, and probably a ā#glossaryā tag (unless thatās the only thing on the site) and probably a letter tag (i.e. ā#startswithAā). Then your front page with be a listing of items, sorted by tag and then within the tag by post name.
Sounds doable to me! Iād pick a theme that you /basically/ like the looks of and start from there!
For what itās worth, Iāve been trying to do a glossary setup as follows:
updated routes.yaml collections section as follows:
collections:
/glossary/:
permalink: /glossary/{slug}/
filter: primary_tag:glossary
template: post
/:
permalink: /{slug}/
template: index
Thus, anything tagged with glossary will be routed as website/glossary/post-slug
My main problem now is - I canāt figure out how to get a glossary index setup. I want to put the index at website/glossary/. Iāve added a glossary.hbs to create a template, but i canāt seem to get it working right. Iāll post back here if I figure it out.
routes:
/glossary/ <--- not sure if this conflicts with the collections
template:glossary <--- not sure if it likes this
Unclear if its upset with the templates in my routes.yaml or if itās just bad handlebars code in my glossary.hbs⦠OR because I previously created and deleted a /glossary/ page in the Ghost UI and maybe itās mad now
The template there should be an index template, not a post template. Itās the template to deal with a grouping of posts, not a single post. If you switch the template to index, does that work? Then youāll know routing is ok and glossary.hbs Iād to blame.
If youāre self hosting, youāll need to restart to get the new hbs recognized, if youāre adding/editing it in place rather than uploading a new version of the theme. ghost run -D is awesome for debugging template problems on self-host or local install.