Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltips Do Not Respect Frontmatter slug #29

Open
osterman opened this issue Feb 12, 2024 · 0 comments
Open

Tooltips Do Not Respect Frontmatter slug #29

osterman opened this issue Feb 12, 2024 · 0 comments

Comments

@osterman
Copy link

osterman commented Feb 12, 2024

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

  1. The tooltip feature seems to render the slug based on the id, not taking into account the slug parameter.
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant