-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
OWD project: Provide an embeddable version of HTML and CSS reference documentation #174
Comments
One thing that's come up is how to handle internal MDN links. These links are usually going to be relative, like From the embedder's point of view: if a link appears in the embedded content it needs to go somewhere. But embedders might have quite application-specific requirements about what should happen with links. They might:
Also, they might want different policies for different targets (so for example, they might want links to CSS property pages to go somewhere else, but all other links to go to MDN pages). I think the best policy is:
Then the embedder can decide if it wants to rewrite any links, but if they do nothing, links will still at least work. |
Two questions:
|
This is mentioned up there^. If consumers want localized versions we will try to provide them. I think the answer is a bit nuanced though.
I think mdn/data is a kind of prototype for this. The main difference though is that the content is not maintained by this tool: instead this tool compiles data from other sources (MDN, webref, BCD). Does that help clarify things at all? |
Problem statement
Developer tools often integrate reference documentation about web platform technologies. For example, Chrome DevTools and VS Code both display popups that contain information about CSS properties.
These tools need an embeddable way to represent this documentation, so they can display it in the correct context. Typically these tools maintain their own copy of this documentation-data, sometimes partially integrating it from other sources like browser-compat-data or mdn/content. This is an ongoing maintenance burden for these projects, and the documentation-data is often not up to date. Because the maintainers of these tools are not always familiar with the content or organization of the source material it is hard for them to update it or to know what additional useful data might be available.
Proposed solutions
The proposal is that Open Web Docs create and regularly update one or more npm packages containing structured documentation for HTML and CSS. This includes:
The content could be drawn from various sources:
The structured documentation would be made available as JSON, and would enable a caller to use an identifier like
css.properties.margin
orcss.types.color
as a key to retrieve an object containing the documentation for that item.Content
The data provided for an item is not completely defined and would depend on the type of item, but for CSS properties it could include:
Composability
Rather than deliver a single package, we might deliver multiple packages, so consumers can choose which data they want to include. So if a consumer wants only CSS descriptions, but no BCD or spec info, they don’t have to include the parts they don’t need.
Questions
Why CSS and HTML?
We think it will be possible to do something similar to this for all the main parts of the MDN reference documentation: JavaScript, CSS, Web/APIs, HTML, HTTP. We've chosen CSS and HTML first because:
Will content be localized?
If there's enough demand.
What will the license be?
CC-BY-SA: this is the license that MDN uses for content.
What format will be used for prose?
A very restricted set of HTML: essentially, the same set of HTML that MDN’s Markdown is capable of expressing.
There are a few HTML elements that are included “raw” in the source, like
<kbd>
..Task list
Priority assessment
No response
More information
Open Web Docs (OWD) is a non-profit collective funded by corporate and individual donations.
In order for this project to happen, please consider donating to OWD on https://opencollective.com/open-web-docs.
For more information on sponsorship and membership tiers, see https://openwebdocs.org/membership/
More information is available at https://openwebdocs.org/.
For questions, please reach out to [email protected].
The text was updated successfully, but these errors were encountered: