Source code of my website
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

🔧 : add mermaid diagrams support

+28
+6
assets/css/custom.css
··· 286 286 font-style: italic; 287 287 font-size: 0.9rem; 288 288 } 289 + 290 + /* background color of mermaid diagrams */ 291 + .content pre.mermaid{ 292 + color: var(--code-block-color); 293 + background-color: var(--bkg-color) !important; 294 + }
+4
layouts/_default/_markup/render-codeblock-mermaid.html
··· 1 + <pre class="mermaid"> 2 + {{ .Inner | htmlEscape | safeHTML }} 3 + </pre> 4 + {{ .Page.Store.Set "hasMermaid" true }}
+18
layouts/_default/baseof.html
··· 1 + {{ partial "head/head.html" . }} 2 + <body class="{{if .Site.Params.layoutReverse}}layout-reverse {{end}}{{if .Site.Params.dark_mode}}dark-theme{{end}}"> 3 + <div class="wrapper"> 4 + {{ partial "sidebar/sidebar.html" . }} 5 + <main class="content container"> 6 + {{ block "main" . -}}{{- end }} 7 + </main> 8 + {{ block "sidebar" . }}{{ end }} 9 + </div> 10 + 11 + {{ if .Store.Get "hasMermaid" }} 12 + <script type="module"> 13 + import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs'; 14 + mermaid.initialize({ startOnLoad: true }); 15 + </script> 16 + {{ end }} 17 + </body> 18 + </html>