Skip to content

Commit

Permalink
Release: Add template for mermaid (#158)
Browse files Browse the repository at this point in the history
* ♻️ Add template for mermaid

Signed-off-by: vankichi <kyukawa315@gmail.com>

* 🤖 auto update stage ⬆️

Signed-off-by: vdaas-ci <ci@vdaas.org>

* 💚 Fix actions error

Signed-off-by: vankichi <kyukawa315@gmail.com>

---------

Signed-off-by: vankichi <kyukawa315@gmail.com>
Signed-off-by: vdaas-ci <ci@vdaas.org>
Co-authored-by: vdaas-ci <ci@vdaas.org>
  • Loading branch information
vankichi and vdaas-ci committed Jan 30, 2024
1 parent f72d164 commit 3273ff0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/auto-update-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ jobs:
id: go_version
shell: bash
run: |
GO_VERSION=${GO_VERSION:-`make version/go`}
GO_VERSION=$(make version/go)
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT
env:
GO_VERSION: ${{ input.go_version }}
- uses: actions/setup-go@v4
with:
go-version: ${{ steps.go_version.outputs.version }}
Expand Down
2 changes: 1 addition & 1 deletion preview
Submodule preview updated 1 files
+1 −1 index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<pre class="mermaid">
{{- .Inner | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}
6 changes: 6 additions & 0 deletions themes/vald/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@ <h1 id="title" class="error__title">404 page not found</h1>
<p class="error__message"><a class="error__link" href="{{ "/" | relURL }}">Page Top</a></p>
</div>
{{ end }}
{{ if .Page.Store.Get "hasMermaid" }}
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true, theme: 'neutral', darkMode: false });
</script>
{{ end }}
{{ end }}
7 changes: 0 additions & 7 deletions themes/vald/layouts/partials/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,4 @@
<link rel="stylesheet" type="text/css" href="/css/footer.css">
<link rel="stylesheet" type="text/css" href="/css/main.css">
<script type="text/javascript" src="/js/script.js" defer></script>
<script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>
<script>
mermaid.initialize ({
startOnLoad: true,
theme: 'neutral'
});
</script>
{{ end }}

0 comments on commit 3273ff0

Please sign in to comment.