docs: add hugo site
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
f7b3869062
commit
e2ae76f1f2
291 changed files with 2833 additions and 2 deletions
11
docs/themes/hugo-geekdoc/layouts/_default/_markup/render-codeblock-mermaid.html
vendored
Normal file
11
docs/themes/hugo-geekdoc/layouts/_default/_markup/render-codeblock-mermaid.html
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!-- prettier-ignore-start -->
|
||||
{{ if not (.Page.Scratch.Get "mermaid") }}
|
||||
<!-- Include mermaid only first time -->
|
||||
<script defer src="{{ index (index .Page.Site.Data.assets "mermaid.js") "src" | relURL }}"></script>
|
||||
{{ .Page.Scratch.Set "mermaid" true }}
|
||||
{{ end }}
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<pre class="gdoc-mermaid mermaid text-center">
|
||||
{{- .Inner -}}
|
||||
</pre>
|
27
docs/themes/hugo-geekdoc/layouts/_default/_markup/render-heading.html
vendored
Normal file
27
docs/themes/hugo-geekdoc/layouts/_default/_markup/render-heading.html
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
{{- $showAnchor := (and (default true .Page.Params.geekdocAnchor) (default true .Page.Site.Params.geekdocAnchor)) -}}
|
||||
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
{{- if $showAnchor -}}
|
||||
<div class="flex align-center gdoc-page__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
||||
class="{{ . }}"
|
||||
{{- end }}
|
||||
>
|
||||
{{ .Text | safeHTML }}
|
||||
</h{{ .Level }}>
|
||||
<a data-clipboard-text="{{ .Page.Permalink }}#{{ .Anchor | safeURL }}" class="gdoc-page__anchor clip flex align-center" title="{{ i18n "title_anchor_prefix" }} {{ .Text | safeHTML }}" aria-label="{{ i18n "title_anchor_prefix" }} {{ .Text | safeHTML }}" href="#{{ .Anchor | safeURL }}">
|
||||
<svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
{{- else -}}
|
||||
<div class="gdoc-page__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
||||
class="{{ . }}"
|
||||
{{- end }}
|
||||
>
|
||||
{{ .Text | safeHTML }}
|
||||
</h{{ .Level }}>
|
||||
</div>
|
||||
{{- end -}}
|
||||
<!-- prettier-ignore-end -->
|
6
docs/themes/hugo-geekdoc/layouts/_default/_markup/render-image.html
vendored
Normal file
6
docs/themes/hugo-geekdoc/layouts/_default/_markup/render-image.html
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
<img
|
||||
src="{{ .Destination | safeURL }}"
|
||||
alt="{{ .Text }}"
|
||||
{{ with .Title }}title="{{ . }}"{{ end }}
|
||||
/>
|
||||
{{- /* Drop trailing newlines */ -}}
|
14
docs/themes/hugo-geekdoc/layouts/_default/_markup/render-link.html
vendored
Normal file
14
docs/themes/hugo-geekdoc/layouts/_default/_markup/render-link.html
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{- $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") -}}
|
||||
{{- $code := hasPrefix .Text "<code" -}}
|
||||
<a
|
||||
class="gdoc-markdown__link{{ if $raw -}}
|
||||
--raw
|
||||
{{- else if $code -}}
|
||||
--code
|
||||
{{- end }}"
|
||||
href="{{ .Destination | safeURL }}"
|
||||
{{- with .Title }}{{ printf "title=\"%s\"" . | safeHTMLAttr }}{{- end }}
|
||||
>
|
||||
{{- .Text | safeHTML -}}
|
||||
</a>
|
||||
{{- /* Drop trailing newlines */ -}}
|
Loading…
Add table
Add a link
Reference in a new issue