-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Var component support Closes #14 Copy the `Var` component `VarsProvider` context provider from `gravitational/docs` and adapt them to the Docusaurus site. Edit the `remark-update-tags` to not remove `Var` components before building the docs site. Fix the visitor test function in `rehype-hljs`. Check for `Var` placeholders as well as `Var` tags, since otherwise the test won't work in the second `visit` call. Also improve `rehype-hljs` by highlighting any unlabeled code snippets as `text` to avoid rendering issues. * Edit rehype-hljs Don't check text values in the visitor test function. Since we execute this function against every rehype AST node in the docs, don't create a RegExp and match it to find `Var` tags or placeholders. We do this inside the visitor functions anyway.
- Loading branch information
Showing
9 changed files
with
384 additions
and
160 deletions.
There are no files selected for viewing
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
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
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
Oops, something went wrong.