Move data about sidebars and headers from HTML to YAML #2459
bershanskiy
started this conversation in
Ideas
Replies: 1 comment
-
We could start with just setting the sidebar in the front-matter. Other KS macros like What's exciting to me is the potential to rewrite the sidebars. Instead of generating the sidebars from a KS macro (with full HTML) we can instead write a new piece of Node code that traverses the tree of files and extracts all the URLs + titles and then groups them into a plain array. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
MDN has a lot of macros which insert headers and sidebars, including:
Draft
SeeCompatTable
AddonSidebar
,ToolsSidebar
,APIRef
, etc.securecontext_header
AvailableInWorkers
I think it's possible to move these declarations to YAML header. Then later we could even cross-check some of them with BCD.
Examples
Draft
draft: true
draft
is omitted orfalse
document is not draft. Any value besidestrue
andfalse
is invalid.non-standard_header
standard_track: false
standard_track
deprecated_header
deprecated: true
deprecated
SeeCompatTable
experimental: true
experimental
AddonSidebar
sidebar: addon
ToolsSidebar
sidebar: tool
APIRef("_string_")
sidebar: "_string_"
Beta Was this translation helpful? Give feedback.
All reactions