-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
[Markdown] Migrate one section of the MDN docs to Markdown #3350
Comments
I've updated this issue. Before it said "migrate a substantial portion of the docs to Markdown" but left it open which portion. I've updated this to pick the JavaScript docs. We've been talking about this choice for a while, so I don't expect it to be contentious. Reasons for this choice:
|
Specifying MDN to Markdown conversionThis document describes how we'll convert MDN's HTML content into Markdown. It's focused on the JavaScript docs (https://developer.mozilla.org/en-US/docs/Web/JavaScript) because converting that is our immediate goal: however, it should be useful for converting more doc sets in the future. It tries to take a systematic approach to conversion by listing:
and deciding what the conversion process needs to do when it sees that item. The full details are in this Google sheet: https://docs.google.com/spreadsheets/d/1Nb-WUHveeUfi5YV0-pzVyHI1vR1IC8xF40IdkiceyQQ/edit#gid=0 . This document describes the spreadsheet, summarises the results, and provides more details on the choices it lists. The spreadsheet has one page for elements, one for attributes, one for values of the
Generic conversion categoriesCells in the "Conversion" column list one of a few different generic categories, which we'll describe here.
For attributes especially, we sometimes combine these, because the resolution is different depending on what the element is. For example Custom conversion categoriesNote/warning/calloutIf an element has class="note":
If an element has class="warning":
If an element has class="callout":
TablesThe short story about tables is: if we can represent it using the GFM table syntax, we will, otherwise we will use HTML (https://developer.mozilla.org/en-US/docs/MDN/Contribute/Markdown_in_MDN#tables). For the converter, this means: if the table contains any features that would prevent it being represented in GFM, then leave it unchanged, otherwise convert it to GFM. Features that would prevent it being represented in GFM include:
One exception is Hidden classIf an element has class="hidden":
The rationale for this is that we expect
For the first case we just want to remove the hidden prose. For the second, case, we can still hide code blocks in the live sample system via the summary/seoSummaryFor the
One complication is "first prose paragraph": many documents start with an element containing only macro calls, like:
Usually this is a Description listsWe've invented our own syntax for However, this is more restrictive than the HTML
Unresolved elements/attributes/class valuesNot all items have a category selected. This means we're still not sure what to do about them. All these items should have a link to a GitHub issue in which we can work out what to do with the item. Once the issue has reached a consensus we can assign a category to the corresponding items and close the issue. The resolution might of course be to invent a new category: for example we might have "Extend GFM" for something like Currently the following groups of items are unresolved:
Once all items are resolved here, we have a complete plan for converting the source into Markdown. As a practical matter, we only need to have a resolution now for items that appear in the JS docs. |
I propose we move this to the Discussions tracker. |
I would like to keep this here. This is an issue, not a discussion: it exists to track some work we want to get done, not to discuss what to do. I do wish GH was better at representing "project issues" like this but think issues are a better fit than discussions. I agree on all the "decide what to do" ones though. |
OK, yup — makes sense |
Closed by #7092 . |
This is the “project summary issue” (https://developer.mozilla.org/en-US/docs/MDN/Contribute/Processes/Workstream_assessment_project#overall_project_summary_issue) for the project to migrate the MDN JavaScript docs into Markdown.
RFC for the work: openwebdocs/project#25
People
@wbamberg, responsible for:
@fiji-flo, responsible for :
@ddbeck, @chrisdavidmills, @Elchi3: consulted especially around questions of authoring formats and Markdown extensions.
@escattone, @peterbe: consulted especially around Yari architecture questions
Success criteria:
Steps/tasks:
The text was updated successfully, but these errors were encountered: