-
Notifications
You must be signed in to change notification settings - Fork 22.7k
chore: Move mdnsidebar into front matter #39274
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
...s/en-us/mdn/writing_guidelines/page_structures/page_types/http_header_page_template/index.md
Outdated
Show resolved
Hide resolved
@@ -64,17 +66,14 @@ sidebar: mdnsidebar | |||
> - `\{{SecureContext_Header}}` — this generates a **Secure context** banner that indicates the technology is only available in a [secure context](/en-US/docs/Web/Security/Secure_Contexts). |
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.
I think we should remove this (and the one in SVG element). Elements don't make sense to be secure-context-only. And then we can remove the whole "You should update or delete the following macros according to the advice below:" part.
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.
Yes ^^^
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.
done in 8c34575
@@ -3,10 +3,9 @@ title: Learn web development writing guidelines | |||
short-title: Learning content | |||
slug: MDN/Writing_guidelines/Learning_content | |||
page-type: mdn-writing-guide | |||
sidebar: mdnsidebar |
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.
Just "FWIW", we no longer need to include sidebar in the name if we're always referencing a sidebar. I.e. this would have been better as
sidebar: mdn
It made sense for macros since we had macros with different purposes.
I do much prefer this approach!
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.
Just "FWIW", we no longer need to include sidebar in the name if we're always referencing a sidebar. I.e. this would have been better as
sidebar: mdn
Yeah this is really leftovers due to migrating everything from Yari land, naming was kept so existing sidebars worked in the new world. I think we've broken that convention in some cases (like in the Privacy section -> #38269) - and totally agree this is much nicer not to have to duplicate 'sidebar' if possible :)
.../en-us/mdn/writing_guidelines/page_structures/page_types/css_function_page_template/index.md
Show resolved
Hide resolved
.../en-us/mdn/writing_guidelines/page_structures/page_types/css_property_page_template/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mdn/writing_guidelines/page_structures/page_types/glossary_page_template/index.md
Show resolved
Hide resolved
...s/en-us/mdn/writing_guidelines/page_structures/page_types/http_header_page_template/index.md
Outdated
Show resolved
Hide resolved
...s/en-us/mdn/writing_guidelines/page_structures/page_types/http_header_page_template/index.md
Outdated
Show resolved
Hide resolved
…http_header_page_template/index.md
...s/en-us/mdn/writing_guidelines/page_structures/page_types/http_header_page_template/index.md
Outdated
Show resolved
Hide resolved
…http_header_page_template/index.md
…css_property_page_template/index.md Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
.../mdn/writing_guidelines/page_structures/page_types/css_module_landing_page_template/index.md
Outdated
Show resolved
Hide resolved
.../en-us/mdn/writing_guidelines/page_structures/page_types/css_selector_page_template/index.md
Outdated
Show resolved
Hide resolved
Thanks, both! I'm going to merge now to get the changes in, but I think we can revisit the templates in general. I don't really like stuffing everything into a note block in the top of the page, and there's a lot of duplication. Compared to https://pr39274.review.mdn.allizom.net/en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/ARIA_Page_Template which is a bit easier to read, that's an improvement, IMO. Or we can look at actual templating that rari can consume / produce. |
Description
There are leftovers in this section that we should clean up.
Using front matter in all
/mdn
pages instead of macro has the side-effect that the page content should be updated, too.Updating templates to use front matter for non-parameterized sidebars, this will likely be the default going forward.
Motivation
Fewer macros embedded in prose and page layout / type defined in front matter.
Related issues and pull requests