This is a feature, originally from gitbook.io. I want to bring it up for further discussion.
They have a convention for a GLOSSARY.md file with the following format:
# term
Definition for this term
# Another term
With it's definition, this can contain bold text and all other kinds of inline markup ...
馃摑 https://gitbookio.gitbooks.io/documentation/format/glossary.html
Allows you to specify terms and their respective definitions to be displayed in the glossary.
Based on those terms, vuepress will automatically build an index and highlight those terms in pages.
Scan a pre-defined file (eg. GLOSSARY.md) for key/value pairs. Scan the docs copytext where the key matches, add the following markup: <a href="glossary.html#[key]" title="[value]">[key]</a>
An example can be found here:
<a href="glossary.html#api" class="glossary-term" title="API is a fun, ambiguous term. It stands for 'Application Programming Interface'. It's a fancy phrase for talking about some agreed-upon way for two programs to talk to each other. It can refer to the specification, as well as the implementation. In recent years, people have often meant 'HTTP API' (or API that uses http as the channel of communication) when talking about APIs. When someone says 'Twitter has an API', they mean Twitter has an HTTP API, which boils down to a special webpage that works as a function. For example, it could be something like twitter.com/api/tweets, which would then respond with a list of all tweets in json format. APIs each have different ways of handling authentication. If you want to see an example of an HTTP api, check out the Co-lab's interactive api documentation page."> API</a>
Nope, i would need a lot of help in js context.
I believe this would be a nice addition, but I'd say this would be better suited via plugin :wink:
I think adding this to core would be a good idea. Then people can migrate from gitbook to vuepress easier if they want.
@neumayr I have recently begun to write a glossarifier. Not particularly for vuepress and I am not planning for it. However it's a tool where you feed markdown in and get markdown out. Thus it is transparent to vuepress and can be integrated as kind of a preprocessing step into a vuepress build pipeline.
If you think glossarify-md is what you are looking for, then you might want to give it a try.
Kudos go to
I am currently working on a Vuepress specific glossary plugin.
I will give a link as soon as I get it published.
I have implemented a Glossary plugin for Vuepress. Check it out here: https://www.npmjs.com/package/vuepress-plugin-glossary
All feedback welcome :)
@eeriksp any link to a VP webapp that is using your plugin?
Most helpful comment
I think adding this to core would be a good idea. Then people can migrate from gitbook to vuepress easier if they want.