Skip to content
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/csp guide #947

Merged
merged 8 commits into from
Jan 17, 2023
Merged

Docs/csp guide #947

merged 8 commits into from
Jan 17, 2023

Conversation

tanner-reits
Copy link
Member

Adds a guide to the "Guides" section for using CSP nonces in Stencil. This covers some basic introduction to what a CSP/nonce is as well as the niche behavior for ingesting nonces into Stencil.

@vercel
Copy link

vercel bot commented Dec 13, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
stencil-site ✅ Ready (Inspect) Visit Preview Jan 10, 2023 at 7:00PM (UTC)

@tanner-reits
Copy link
Member Author

@rwaskiewicz I might be missing something here. I needed to add a page to the side-nav (which I haven't done before), but when I look at the Vercel deployment this PR generated, clicking the new guide just shows the JSON asset generated from the markdown. Did I configure something wrong?

@rwaskiewicz
Copy link
Member

@tanner-reits Yeah, if you can run npm run build, which runs the docs script and generates everything for you (or should 🤔)

@tanner-reits
Copy link
Member Author

@rwaskiewicz Ah thanks! That was the secret sauce, but I also copied the header/metadata section from the only doc in that directory that didn't have the url attribute set which was also causing problems 🙄 All should be well now with the Vercel preview!

src/docs/guides/csp-nonce.md Outdated Show resolved Hide resolved
src/docs/guides/csp-nonce.md Outdated Show resolved Hide resolved
src/docs/guides/csp-nonce.md Outdated Show resolved Hide resolved
src/docs/guides/csp-nonce.md Outdated Show resolved Hide resolved
src/docs/guides/csp-nonce.md Outdated Show resolved Hide resolved
src/docs/guides/csp-nonce.md Outdated Show resolved Hide resolved
src/docs/guides/csp-nonce.md Outdated Show resolved Hide resolved
src/docs/guides/csp-nonce.md Outdated Show resolved Hide resolved
Copy link
Member

@rwaskiewicz rwaskiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one outstanding question for v3

@@ -79,11 +78,11 @@ This is an example of consuming the `dist-custom-elements` output in an Angular
// main.ts

import { defineCustomElements, setNonce } from 'my-lib/dist/components';
// We'll assume we have `autoDefineCustomElements` enabled
// Assume `autoDefineCustomElements` is enabled enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we want to handle this once autoDefineCustomElements goes away in v3.0.0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once this lands and we rebase v3, I can put up a small PR to change this comment to the export behavior instead

Copy link
Contributor

@alicewriteswrongs alicewriteswrongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants