-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Redo Mermaid shortcode (Docsy alignment) #46681
Redo Mermaid shortcode (Docsy alignment) #46681
Conversation
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
c38f339
to
299a485
Compare
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.
The changes look good, and the preview works as expected.
/lgtm
/approve
(Unofficially giving the nod of approval; official approval required from sig-docs-website-owner
)
LGTM label has been added. Git tree hash: b76e040d0b9642a2b9cf71757313bae7f68de34f
|
299a485
to
d8290fa
Compare
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.
Re-applying the label from #46681 (review). The change still looks good to me ;)
/lgtm
LGTM label has been added. Git tree hash: 0a1d3b7fa5e27ec625f5226e144a9dbbb5d33823
|
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.
See inline for two minor nits.
/lgtm
@@ -13,3 +13,13 @@ | |||
{{- if .HasShortcode "cncf-landscape" -}} | |||
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.9/iframeResizer.min.js" integrity="sha384-hHTwgxzjpO1G1NI0wMHWQYUxnGtpWyDjVSZrFnDrlWa5OL+DFY57qnDWw/5WSJOl" crossorigin="anonymous"></script> | |||
{{- end -}} | |||
|
|||
{{ if .HasShortcode "mermaid" }} | |||
<!-- Copied from https://unpkg.com/mermaid@10.6.1/dist/mermaid.min.js --> |
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 don't see how this comment makes sense anymore It might at some point in the past when part of the .min.js script was embedded here, but that clearly is no longer the case.
<!-- Copied from https://unpkg.com/mermaid@10.6.1/dist/mermaid.min.js --> |
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.
Why does this no longer make sense? The point is to let people confirm the value of integrity
and also to understand / verify the provenance.
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.
With a statement like "Copied from https://unpkg.com/mermaid@10.6.1/dist/mermaid.min.js" I expect to see code excerpted from the named file and inlined below, but I'm not seeing any such embedded code.
Oh, right, you're doing a get resource, and so losing the link to the source by the same token. Got it.
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, the comment is in the place where we do the Get
; this lets us ensure that the committed file contents 100% match the minified JS. We prefer to have the files be 100% the same.
One day we might be able to load Mermaid from an external CDN.
{{- with resources.Get "js/mermaid-10.6.1.min.js" -}} | ||
<script src="{{ .RelPermalink }}" integrity="sha384-+NGfjU8KzpDLXRHduEqW+ZiJr2rIg+cidUVk7B51R5xK7cHwMKQfrdFwGdrq1Bcz"></script> | ||
{{- else -}} | ||
<!-- without Mermaid, the site won't appear right --> |
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.
<!-- without Mermaid, the site won't appear right --> | |
{{/* Without Mermaid, the site won't appear right */ -}} |
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 thought about that, but I went for an HTML comment. The build is about to fail in a few microseconds so I'm not worried about this comment appearing inside the <head>
of the final rendered page.
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.
(see the very next line!)
@chalin: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
d8290fa
to
a026f71
Compare
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.
/lgtm
LGTM label has been added. Git tree hash: 53ac7954ba39a89d990f44f872d437224430a628
|
a026f71
to
fff5913
Compare
fff5913
to
7af5e6c
Compare
(rebased) |
7af5e6c
to
66f1749
Compare
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.
/lgtm
(Would be good to get this merged; official approval required from sig-docs-website-owner
)
LGTM label has been added. Git tree hash: 753bc8f8f52e5592a85e4c01889209290e6f7189
|
Ready this for vanilla Docsy
66f1749
to
ef41204
Compare
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.
Re-applying the label from previous review. The change still looks good to me.
/lgtm
LGTM label has been added. Git tree hash: b3ebcab6762b5e5d3d8ce10b2c5ba855432137da
|
The changes render good to me |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chalin, reylejano The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Ready our handling of Mermaid shortcodes so that we can eventually use the vanilla
head.html
layout from upstream Docsy./area web-development
/kind cleanup
Helps with #41171
Existing example | preview