Skip to content

Commit

Permalink
Update instructions for adding new macros
Browse files Browse the repository at this point in the history
I was looking at how to fix an incorrect spec link, and found some instructions made out-of-date by mdn/yari#4081. 

I have updated this section based on what I think is now the correct workflow with an updated example (based on the most-recent PR I found).
  • Loading branch information
astearns committed Nov 14, 2021
1 parent f2b914d commit 6f6ecaa
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,21 +713,17 @@ KumaScript macros are still used on MDN pages, even in the new platform.
These are the function names surrounded by handlebars-style double curly
braces that you'll see in the source code on occasion, for example
`{{domxref}}` Eventually we have to replace them with something else,
but they are here for now. They live in <https://github.com/mdn/yari/tree/main/kumascript/macros>.
but they are here for now. They live in <https://github.com/mdn/content/blob/main/files/jsondata/>.
Sometimes you'll want to make a change to the content that relies on a
macro change. Take [https://github.com/mdn/content/pull/187](https://github.com/mdn/content/pull/187).
Florian wanted to add documentation for a new WebGL extension to MDN, but
this change relied on the new feature's spec being added to
<https://github.com/mdn/yari/blob/main/kumascript/macros/SpecData.json>.
If not, the specification table on the new page would not render properly
because the data it relies on would not be there.
In such situations:
1. Make the required PR to <https://github.com/mdn/yari/tree/main/kumascript/macros>
first, and get that merged.
2. Add the content to this repo.
macro change. Take [https://github.com/mdn/content/pull/9985](https://github.com/mdn/content/pull/9985).
Patrick wanted to add documentation for a new Eyedropper API, so
new entries were needed for the spec in
<https://github.com/mdn/content/blob/main/files/jsondata/SpecData.json>
and the interface in
<https://github.com/mdn/content/blob/main/files/jsondata/GroupData.json>.
Without those entries, macros on the new page would not render properly
because the data they rely on would not be there.
## Frequently asked questions (FAQ)
Expand Down

0 comments on commit 6f6ecaa

Please sign in to comment.