-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
988 additions
and
96 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<pre class="mermaid"> | ||
{{- .Inner }} | ||
</pre> | ||
{{ .Page.Store.Set "hasMermaid" true }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!-- Prism Render Hook --> | ||
{{ if eq .Page.Site.Params.docs.prism true }} | ||
{{- $attributes := .Attributes }} | ||
{{- $ordinal := .Ordinal }} | ||
|
||
<!-- Create SHA1 Hash of Code Block--> | ||
{{ $innerRemoveLB := replaceRE "\r\n?|\n" "" .Inner | string }} | ||
{{ $innerHash := substr (sha1 (printf "%s%s" $innerRemoveLB $ordinal)) 0 7 }} | ||
|
||
{{- $classes := slice (printf "language-%s" .Type) .Attributes.class }} | ||
|
||
<!-- Options List --> | ||
{{- $options := .Options }} | ||
{{ $optionslist := newScratch }} | ||
{{ range $k, $v := $options }} | ||
{{ $optionslist.Add "options" (printf " %s" $k) }} | ||
{{ end }} | ||
{{ $optionsclasslist := $optionslist.Get "options" }} | ||
|
||
<!-- Line Number Highlight --> | ||
{{- if isset .Options "hl_lines" }} | ||
{{ $lines := .Options.hl_lines }} | ||
|
||
{{ $offset := 0 }} | ||
{{- if isset .Options "linenostart" }} | ||
{{ $offset = .Options.linenostart }} | ||
{{ else }} | ||
{{ $offset = 1 }} | ||
{{ end }} | ||
|
||
{{ $data := newScratch }} | ||
{{ range $value := $lines }} | ||
{{ $value = uniq $value }} | ||
{{ if lt (len $value) 2 }} | ||
{{ $value = slice (add $offset (index $value 0)) }} | ||
{{ else }} | ||
{{ $value = slice (delimit (slice (add $offset (index $value 0)) (add $offset (index $value 1))) "-") }} | ||
{{ end }} | ||
{{ $data.Add "lines" $value }} | ||
{{ end }} | ||
{{ $lines = delimit ($data.Get "lines") "," }} | ||
|
||
{{- $attributes = merge $attributes (dict "data-line" $lines) }} | ||
|
||
<!-- https://github.com/PrismJS/prism/issues/2714 --> | ||
{{- if and (isset .Options "linenos") (ne .Options.linenos false) }} | ||
{{- $attributes = merge $attributes (dict "data-line-offset" (string $offset)) }} | ||
{{ else }} | ||
{{- $attributes = merge $attributes (dict "data-line-offset" (string (sub $offset 1))) }} | ||
{{ end }} | ||
|
||
{{ end -}} | ||
|
||
<!-- Line Numbers --> | ||
{{- if and (isset .Options "linenos") (ne .Options.linenos false) }} | ||
{{- $classes = $classes | append "line-numbers" }} <!-- https://discourse.gohugo.io/t/scope-issue-inside-conditional-block-i-think/29273/4 --> | ||
{{ end -}} | ||
|
||
<!-- Line Number Start --> | ||
{{- if isset .Options "linenostart" }} | ||
{{- $attributes = merge $attributes (dict "data-start" (string .Options.linenostart)) }} | ||
{{ end -}} | ||
|
||
<!-- Linkable Line Numbers --> | ||
{{- if and (isset .Options "anchorlinenos") (ne .Options.anchorlinenos false) }} | ||
{{- $classes = $classes | append "linkable-line-numbers" }} | ||
{{ end -}} | ||
|
||
{{- $attributes = merge $attributes (dict "class" (delimit $classes " ")) }} | ||
|
||
<div class="prism-codeblock {{ $optionsclasslist }}"> | ||
<pre id="{{ $innerHash }}" | ||
{{- range $k, $v := $attributes }} | ||
{{- printf " %s=%q" $k $v | safeHTMLAttr }} | ||
{{- end -}} | ||
> | ||
<code> | ||
{{- .Inner -}} | ||
</code> | ||
</pre> | ||
</div> | ||
{{ else }} | ||
{{ $result := transform.HighlightCodeBlock . }} | ||
{{ $result.Wrapped }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" class="anchor" aria-hidden="true"><i class="material-icons align-middle"></i></a></h{{ .Level }}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ $dest := .Destination }} | ||
{{ $text := .PlainText }} | ||
{{ $url := urls.Parse $dest }} | ||
|
||
{{ $image := newScratch }} | ||
{{ with $url.Scheme }} | ||
{{ $image.Set "resource" (resources.GetRemote $dest) }} | ||
{{ else }} | ||
{{ $image.Set "resource" (resources.Get $dest) }} | ||
{{ end }} | ||
|
||
{{ if .Title }} | ||
<figure> | ||
{{ with ($image.Get "resource") }} | ||
{{ if eq .MediaType.SubType "svg" }} | ||
{{ .Content | safeHTML }} | ||
{{ else }} | ||
<img src="{{ .RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy"> | ||
{{ end }} | ||
{{ else }} | ||
<img src="{{ .Destination | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy"> | ||
{{ end }} | ||
<figcaption>{{ .Title | markdownify }}</figcaption> | ||
</figure> | ||
{{ else }} | ||
{{ with ($image.Get "resource") }} | ||
{{ if eq .MediaType.SubType "svg" }} | ||
{{ .Content | safeHTML }} | ||
{{ else }} | ||
<img src="{{ .RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy"> | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{- /* This render hook now simply outputs the link text without altering the destination URL. */}} | ||
|
||
{{- $renderHookName := "link" }} | ||
{{- $minHugoVersion := "0.114.0" }} | ||
{{- if lt hugo.Version $minHugoVersion }} | ||
{{- errorf "The %q render hook requires Hugo v%s or later." $renderHookName $minHugoVersion }} | ||
{{- end }} | ||
|
||
{{- /* Set attributes for anchor element. */}} | ||
{{- $attrs := dict "href" .Destination }} | ||
{{- with .Title }} | ||
{{- $attrs = merge $attrs (dict "title" .) }} | ||
{{- end }} | ||
|
||
{{- /* Render anchor element. */}} | ||
<a | ||
{{- range $k, $v := $attrs }} | ||
{{- printf " %s=%q" $k $v | safeHTMLAttr }} | ||
{{- end -}} | ||
>{{ .Text | safeHTML }}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.