Using slug in the frontmatter is a nice way to shorten URLs, without needing to put
categories at the root of the documentation tree.
We would prefer to keep all glossary terms in the reference/glossary/ folder, but
on the web show them as /terms/<something>. We can accomplish this natively in
Docusarus by setting the frontmatter like this:
---
id: stack
slug: /terms/stack
...
---
Problem
- The tooltip feature seems to render the slug based on the
id, not taking into account the slug parameter.
- Using the slug in the markdown link, does not trigger tooltip behavior. E.g.
[Stack](/terms/stack) generates a working link, but hovering over it will not produce a tooltip. Changing this to [Stack](/reference/glossary/stack) works.
Expected Behavior
If the slug exists, use it. Otherwise, default to the current behavior.
Using
slugin the frontmatter is a nice way to shorten URLs, without needing to putcategories at the root of the documentation tree.
We would prefer to keep all glossary terms in the
reference/glossary/folder, buton the web show them as
/terms/<something>. We can accomplish this natively inDocusarus by setting the frontmatter like this:
Problem
id, not taking into account theslugparameter.[Stack](/terms/stack)generates a working link, but hovering over it will not produce a tooltip. Changing this to[Stack](/reference/glossary/stack)works.Expected Behavior
If the
slugexists, use it. Otherwise, default to the current behavior.