Skip to content

Commit

Permalink
Merge pull request #34794 from chrismetz09/bugMermaid
Browse files Browse the repository at this point in the history
Fix Mermaid render problem
  • Loading branch information
k8s-ci-robot authored Sep 1, 2022
2 parents 0f299d3 + 61a1ec2 commit bb3ba4b
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 70 deletions.
12 changes: 5 additions & 7 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ partialCached "head-css.html" . "asdf" }}
<script
src="{{ "js/jquery-3.3.1.min.js" | relURL }}"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
{{ if and (.Site.Params.offlineSearch) (not .Site.Params.gcs_engine_id) }}
<script src="https://unpkg.com/lunr@2.1.6/lunr.js"></script>
<script src="/js/offline-search.js"></script>
Expand Down Expand Up @@ -78,10 +74,12 @@
<meta property="og:type" content="{{ $ogType }}">

{{ if .HasShortcode "mermaid" }}
<!-- Copied from https://unpkg.com/mermaid@8.11.2/dist/mermaid.min.js -->
<script async src="{{ "js/mermaid.min.js" | relURL }}"></script>
<!-- Copied from https://unpkg.com/mermaid@8.13.4/dist/mermaid.min.js -->
<script async src="{{ "js/mermaid-8.13.4.min.js" | relURL }}"></script>
{{ end }}

<script src="/js/jquery-3.6.0.min.js" intregrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" crossorigin="anonymous"></script>

{{- if eq (lower .Params.cid) "community" -}}
{{- if eq .Params.community_styles_migrated true -}}
<link href="/css/community.css" rel="stylesheet"><!-- legacy styles -->
Expand All @@ -90,6 +88,6 @@
{{- end -}}
<script defer src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
{{- end -}}
<script src="{{ "js/script.js" | relURL }}"></script>
<script src="{{ "/js/script.js" | relURL }}"></script>
{{ with .Params.js }}{{ range (split . ",") }}<script src="{{ (trim . " ") | relURL }}"></script><!-- custom js added -->
{{ end }}{{ else }}<!-- no custom js detected -->{{ end }}
13 changes: 5 additions & 8 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@

<script src="/js/popper-1.14.3.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="/js/bootstrap-4.3.1.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

{{ if .Site.Params.mermaid.enable }}
<script src="/js/mermaid.min.js" crossorigin="anonymous"></script>

{{ end }}
<script src="/js/jquery-3.6.0.min.js" integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" crossorigin="anonymous"></script>
<script src="/js/popper-1.16.1.min.js" intregrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="/js/bootstrap-4.6.1.min.js" integrity="sha384-VHvPCCyXqtD5DqJeNxl2dtTyhF78xXNXdkwX1CZeRusQfRKp+tA7hAShOK/B/fQ2" crossorigin="anonymous"></script>
<script src="{{ "js/script.js" | relURL }}"></script>
<script async src="/js/mermaid-8.13.4.min.js" integrity="sha384-5hHNvPeMrNH14oM3IcQofDoBhiclNK3g2+hnEinKzQ07C4AliMeVpnvxuiwEGpaO" crossorigin="anonymous"></script>

{{ $jsBase := resources.Get "js/base.js" }}
{{ $jsAnchor := resources.Get "js/anchor.js" }}
Expand Down
7 changes: 0 additions & 7 deletions static/js/bootstrap-4.3.1.min.js

This file was deleted.

7 changes: 7 additions & 0 deletions static/js/bootstrap-4.6.1.min.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions static/js/jquery-3.3.1.min.js

This file was deleted.

2 changes: 2 additions & 0 deletions static/js/jquery-3.6.0.min.js

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions static/js/jquery.scrollTo-2.1.2.min.js

This file was deleted.

7 changes: 7 additions & 0 deletions static/js/jquery.scrollTo-2.1.3.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions static/js/mermaid-8.13.4.min.js

Large diffs are not rendered by default.

34 changes: 0 additions & 34 deletions static/js/mermaid.min.js

This file was deleted.

5 changes: 0 additions & 5 deletions static/js/popper-1.14.3.min.js

This file was deleted.

5 changes: 5 additions & 0 deletions static/js/popper-1.16.1.min.js

Large diffs are not rendered by default.

0 comments on commit bb3ba4b

Please sign in to comment.