-
Notifications
You must be signed in to change notification settings - Fork 599
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
docs: site build corrections, shared doc scrub, and new content #3215
Conversation
import { FASTElement, customElement, attr, html } from '@microsoft/fast-element'; | ||
|
||
const template = html<NameTag>` |
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.
Should this template instead leverage semantic HTML rather than DIVs with classes?
?Avoid scenarios that require you to directly set HTML, especially when the content is coming from an external source. If you must do this, you should always sanitize the HTML. | ||
|
||
The best way to accomplish HTML sanitization is to configure [a trusted types policy](https://w3c.github.io/webappsec-trusted-types/dist/spec/) with FASTElement's template engine. FASTElement ensures that all HTML strings pass through the configured policy. Also, by leveraging the platform's trusted types capabilities, you get native enforcement of the policy through CSP headers. Here's an example of how to configure a custom policy to sanitize HTML: |
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.
You may want to explain the acronym for CSP.
</div> | ||
|
||
<div class="footer"></div> |
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.
Same templating concern as commented on previously with reliance on divs over semantics.
Description
A collection of updates to the documentation build and content.
Motivation & context
There were a few bugs and omissions in the original docs build setup which needed to be fixed. As part of that work, several documents were more correctly integrated and cleaned up. Here's a list of what this PR includes:
prepare-docs
script so that it works on both Mac and Windowsprepare-docs
script to copy special markdown files from various locations in the repo, stripping the markdown h1s and merging them with standard yaml metadata. The special docs include: code of conduct, contributing, license, security, and acknowledements.prepare-docs
to filter out specific component docs for components we aren't ready to make public.prepare-docs
.prepare-docs
.docs
temp folder from source control.fast-element
.community/join
article.community/contributor-guide
article to include machine and tool setup, along with corrections to commands and procedures for web components.community/writing-documentation
article to include basics of markdown and api documentation, along with instructions on how to test documentation locally.resources/browser-support
article.resources/glossary
article.resources/faq
article.Note: The bulk of the deleted files are the removal of the
docs
temp folder from source control.Issue type checklist
Process & policy checklist