mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
add examples to docs site
This commit is contained in:
parent
53adf2b3b7
commit
a76ddefe1c
30 changed files with 328 additions and 119 deletions
11
docs/layouts/shortcodes/option.html
Normal file
11
docs/layouts/shortcodes/option.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{{- $option := .Get 0 -}}
|
||||
{{- $module := index (strings.Split $option ".") 0 -}}
|
||||
|
||||
{{/* should we use markdown instead of html? some envs strip raw html */}}
|
||||
{{- $md := .Get 1 | default false -}}
|
||||
|
||||
{{- if $md -}}
|
||||
[{{ $option }}](/modules/{{ $module }}/#{{ $option }})
|
||||
{{- else -}}
|
||||
<a href="/modules/{{ $module }}/#{{ $option }}">{{ $option }}</a>
|
||||
{{- end -}}
|
||||
6
docs/layouts/shortcodes/source.html
Normal file
6
docs/layouts/shortcodes/source.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{{- $file := .Get 0 -}}
|
||||
<div class="source">
|
||||
<pre class="filename">{{ $file }}</pre>
|
||||
{{- $file := path.Join .Page.File.Dir $file -}}
|
||||
{{- highlight ($file | readFile | safeHTML) (path.Ext $file) -}}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue