How to make glossary with ghost

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.

Structure something like this

Reference website: https://www.healthcare.gov/glossary/accreditation/

  • Title / H1
  • Content Copy
  • Recent Posts / Related Content - related that keywords
  • CTA

Any idea?

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!

Post when you get stuck!

Hey, Cathy thank you for the response.

The site would be like /glossary/

You are suggesting that have to create A-Z letter tags and then post just like the normal ghost blog that we used to create, is it?

The index page should be like thisā€¦

The problem with this approach is that we can not get all the tags if tags are not associated with the post.

@RyanF @vanjungg I have the same problem itā€™s the glossary website like this: Glossary

Is there possible to make this kind of content in using custom theme ?

Itā€™s possible to make that type of dictionary page.

You can use the #get helper to fetch posts in alphabetical order.

Check out: Ghost Handlebars Theme Helpers: get

1 Like

No, right, youā€™re going to have to tag each post with its letter.

Hi Keval_Rathod.

Iā€™d like to create a glossary as well. Were you able to figure this out?

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 :sweat_smile:

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.