-
Notifications
You must be signed in to change notification settings - Fork 9
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
docsite: Generate sidebar from _sidebar.md #289
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firebase-deployment for 750625f |
juliaogris
changed the title
docs: Generate sidebar from _sidebar.md
docsite: Generate sidebar from _sidebar.md
Mar 18, 2024
Generate sidebar from _sidebar.md file: Each *.md file not prefixed with `_` becomes a *.html file, for example spec.md becomes spec.html. For each of these HTML pages the navigation section on the left side has the contents of the `_sidebar.md` file from the **same** directory as the original .md file. The contents of `_sidebar.md` are taken as they are _unless_ they are part of a Markdown List where the first content of the list item is a relative link to another markdown file. In that case the list item is expanded to the original link followed by List of all level 2 and level 3 headings of that file nested within each other. For example these `_sidebar.md` contents: # Documentation - [Language Specification](spec.md) - [Built-ins](builtins.md) become # Documentation - [Language Specification](spec.md) - [Syntax Grammar](spec.md#syntax-grammar) - [WSN Syntax Grammar](spec.md#wsn-syntax-grammar) - [Evy Syntax Grammar](spec.md#evy-syntax-grammar) - [Comments](spec.md#comments) - [Types](spec.md#types) - ... - [Built-ins](builtins.md) - [Input and Output](builtins.md#input-and-output) - [print](builtins.md#print), - [read](builtins.md#read), - [cls](builtins.md#cls), - [printf](builtins.md#printf) - [Types](builtins.md#types) - [len](builtins.md#len) - [typeof](builtins.md#typeof) - ... Also add CSS styling in of expanded sidebar to this commit. We will add logic to expand and collapse heading in follow-up commit. Commit-group: 1/2
Generate sidebar from _sidebar.md file: Each *.md file not prefixed with `_` becomes a *.html file, for example spec.md becomes spec.html. For each of these HTML pages the navigation section on the left side has the contents of the `_sidebar.md` file from the **same** directory as the original .md file. The contents of `_sidebar.md` are taken as they are _unless_ they are part of a Markdown List where the first content of the list item is a relative link to another markdown file. In that case the list item is expanded to the original link followed by List of all level 2 and level 3 headings of that file nested within each other. For example these `_sidebar.md` contents: # Documentation - [Language Specification](spec.md) - [Built-ins](builtins.md) become # Documentation - [Language Specification](spec.md) - [Syntax Grammar](spec.md#syntax-grammar) - [WSN Syntax Grammar](spec.md#wsn-syntax-grammar) - [Evy Syntax Grammar](spec.md#evy-syntax-grammar) - [Comments](spec.md#comments) - [Types](spec.md#types) - ... - [Built-ins](builtins.md) - [Input and Output](builtins.md#input-and-output) - [print](builtins.md#print), - [read](builtins.md#read), - [cls](builtins.md#cls), - [printf](builtins.md#printf) - [Types](builtins.md#types) - [len](builtins.md#len) - [typeof](builtins.md#typeof) - ... Also add CSS styling in of expanded sidebar to this commit. We will add logic to expand and collapse heading in follow-up commit. Gen-command: make docs Commit-group: 2/2
On all screens animate subsection expansion and collapse within sidebar. Highlight current heading in sidebar, expand up until current heading or current page if no subheading active (via anchor / URL hash). On mobile slide sidebar in and out. Commit-group: 1/2
On all screens animate subsection expansion and collapse within sidebar. Highlight current heading in sidebar, expand up until current heading or current page if no subheading active (via anchor / URL hash). On mobile slide sidebar in and out. Gen-command: make docs Commit-group: 2/2
Parse _header.md file from the docs directory, used inside docs page header. Update template and md tool. Commit-group: 1/2
Parse _header.md file from the docs directory, used inside docs page header. Update template and md tool. Gen-command: make docs Commit-group: 2/2
camh-
approved these changes
Mar 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. So sorry about the delay in reviewing. 🍪
📗
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sidebar generation
Generate sidebar from
_sidebar.md
file: Each.md
file not prefixed with_
becomes a
.html
file, for examplespec.md
becomesspec.html
. For each ofthese HTML pages the navigation section on the left side has the contents of
the
_sidebar.md
file from the same directory as the original .md file.The contents of
_sidebar.md
are taken as they are unless they are part ofa Markdown List where the first content of the list item is a relative link to
another markdown file. In that case the list item is expanded to the original link
followed by List of all level 2 and level 3 headings of that file nested within
each other. For example these
_sidebar.md
contents:become
Also add CSS styling in of expanded sidebar to this commit.
We will add logic to expand and collapse heading in follow-up commit.
https://evy-lang-stage--289-5dtwvsac.web.app/preview/
Closes evylang/todo#77