-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add gVisor blog post #48
Conversation
@EtiennePerot We can make further edits here (but easy enough to transfer additional stuff from GDoc if we need to). Once this PR is merged it'll go live on the site :) |
45ef7a5
to
5454961
Compare
CSS is not my strongest suit, but I tried the following:
There was a CSS library that stood out, Pico CSS. It breaks our site in various ways, but the elements (table, blockquote, |
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.
How about using SVGs instead?
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.
That was my first impulse as well, but the Google-created SVGs all come with a large white background that needs to be manually cropped, which I've found surprisingly labor-intensive in Inkscape and unpredictable in other tools I've tried. If you have time and better luck with the cropping, a commit to push SVG copies would be welcome, I can take care of the search & replace.
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.
Yep, after taking a swing at it myself, I also wasn't able to find a quick way to do this. Surprisingly finicky files it generates with not just the canvas sizing wrong, but a bunch of stray elements in off-to-the-side locations.
I do wonder if we could have gotten similar results using mermaid... but maybe an experiment for a future time.
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.
I gave it a go as well, and had some success exporting SVGs that render fine in desktop image viewers or when converted to PNG with ImageMagick, but that look broken in both Chrome and Firefox (mostly due to missing or mis-transform
ed embedded images using base64
URLs). Given these difficulties and the evident existence of differences in rendering implementations, I concur we should go with PNGs.
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.
... Actually @apyrgio's SVGs appear to render fine when seen in the GitHub diff preview (which does use <img src="path/to/raw/svg"/>
to display SVGs, not a server-side render), but when opening that same URL in a dedicated tab, fail to render. This is very confusing.
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.
I think that's actually a side-effect of rendering the SVG file with, well... the <svg>
tag. When we fetch this SVG via GitHub, it's downloaded as is, meaning that browsers can render it. This is an attack vector though (see: https://www.securesystems.de/blog/svg-security-risks-not-just-a-scalable-graphic/).
GitHub serves third-party content with a strict Content Security Policy (CSP). I see the following response header when fetching https://raw.githubusercontent.com/freedomofpress/dangerzone.rocks/1b9a41c23dd0a6e34a6cdda893d39fd6e97e1e73/src/assets/img/dangerzone-outline.svg:
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
Most likely, this affects the rendering of the embedded icons somehow, since the browser can render the SVG fine on its own:
Note that our blogs should not be affected for the same reason that GitHub's diff preview is not affected; we load SVGs via the <img>
tag, which has different security properties than embedding it straight in the 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.
As for the SVGs themselves, I removed the white background with Vim, and messed around with the viewBox attribute, until I got something to my satisfaction.
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.
Leaving the conversation open for comments. Else, I don't see something blocking here.
There are still a few edits being made on the doc. I suggest holding off on content edits this for 1 or 2 more days. |
OK, I'm pretty happy with the styling now. I also changed the excerpt logic up a bit, so we can use |
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.
A few small commentary-type notes, but nothing deploy-blocking. Will also take a quick look at SVGs.
a34b55b
to
ebf6444
Compare
Pull request on the gVisor blog side: google/gvisor#10937 (I updated the markdown to match the new contents from the doc, feel free to steal it.) |
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post a5c7ab4 PiperOrigin-RevId: 677215115
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post a5c7ab4 PiperOrigin-RevId: 677215115
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post a5c7ab4 PiperOrigin-RevId: 677215115
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post a5c7ab4 PiperOrigin-RevId: 677215115
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post a5c7ab4 PiperOrigin-RevId: 677215115
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post 136b0af PiperOrigin-RevId: 677215115
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post 136b0af PiperOrigin-RevId: 677215115
Heads up, I've pushed a commit (0776d88) where I've aligned our post title and publication notice with the ones that the gVisor team used as well. Other than that, I've approved the changes and I'm happy to squash and merge at any time. |
Add CSS styles for rendered Markdown elements, such as blockquotes, tables, ordered lists, and code blocks. Also, add styles for figures and their captions. Finally, make some small style tweaks.
Replace an instance of preformatted text (which served as empty space for design purposes) with an HTML paragraph. We have recently started styling preformatted text with a gray background, which means it can no longer be used as empty space.
0776d88
to
3d5f3ad
Compare
3d5f3ad
to
b1107fa
Compare
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post 9f3c604 PiperOrigin-RevId: 677215115
This PR depends on #10936. It adds a blog post about Dangerzone & gVisor integration. The same blog post is being posted on the Dangerzone blog: freedomofpress/dangerzone.rocks#48 When published, it will appear at the following URL: `https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/` Preview: ![dangerzone-preview](https://github.com/user-attachments/assets/be889fb4-0b49-4bdb-931d-8a06a6b1e265) FUTURE_COPYBARA_INTEGRATE_REVIEW=#10937 from EtiennePerot:dangerzone-blog-post 9f3c604 PiperOrigin-RevId: 677215115
preformatted text
and the table are formatted correctly.