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

Add documentation sidebar category labels #309

Closed
Tracked by #308
caendesilva opened this issue May 10, 2022 · 1 comment · Fixed by #326
Closed
Tracked by #308

Add documentation sidebar category labels #309

caendesilva opened this issue May 10, 2022 · 1 comment · Fixed by #326
Assignees

Comments

@caendesilva
Copy link
Member

caendesilva commented May 10, 2022

In the docs rewrite I'm adding categories to the front matter, thinking they can be used to label and group together items in the sidebar.

---
category: "Digging Deeper"
---

Wondering about the best implementation. I have an idea that may not be very efficient but could "work for now":

Scanning all the documentation page files, assembling a list of all the categories used then matching them with the priorities to the label can be injected before the first post in the category.

@caendesilva caendesilva changed the title Documentation sidebar category labels Add documentation sidebar category labels May 10, 2022
@caendesilva
Copy link
Member Author

Re: implementation:

Alternatively, each category could reside in its own <ul>. This may be the better (and more semantic and accessible) option.
Maybe to keep the markup light the feature is enabled if at least one markdown page has the category front matter. Any pages that does not have a category gets grouped in "other"

@caendesilva caendesilva transferred this issue from hydephp/hyde May 10, 2022
@caendesilva caendesilva self-assigned this May 11, 2022
@caendesilva caendesilva linked a pull request May 11, 2022 that will close this issue
3 tasks
caendesilva added a commit that referenced this issue May 11, 2022
…tegory-labels

Add documentation sidebar category labels, fixes #309
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

Successfully merging a pull request may close this issue.

1 participant