mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 16:17:21 +00:00
1 parent
b8fabce217
commit
0d29a0f781
1 file changed
+1
-1
@@ -16,7 +16,7 @@ package tplimpl
|
|||||||
func (t *templateHandler) embedShortcodes() {
|
func (t *templateHandler) embedShortcodes() {
|
||||||
t.addInternalShortcode("ref.html", `{{ if len .Params | eq 2 }}{{ ref .Page (.Get 0) (.Get 1) }}{{ else }}{{ ref .Page (.Get 0) }}{{ end }}`)
|
t.addInternalShortcode("ref.html", `{{ if len .Params | eq 2 }}{{ ref .Page (.Get 0) (.Get 1) }}{{ else }}{{ ref .Page (.Get 0) }}{{ end }}`)
|
||||||
t.addInternalShortcode("relref.html", `{{ if len .Params | eq 2 }}{{ relref .Page (.Get 0) (.Get 1) }}{{ else }}{{ relref .Page (.Get 0) }}{{ end }}`)
|
t.addInternalShortcode("relref.html", `{{ if len .Params | eq 2 }}{{ relref .Page (.Get 0) (.Get 1) }}{{ else }}{{ relref .Page (.Get 0) }}{{ end }}`)
|
||||||
t.addInternalShortcode("highlight.html", `{{ if len .Params | eq 2 }}{{ highlight .Inner (.Get 0) (.Get 1) }}{{ else }}{{ highlight .Inner (.Get 0) "" }}{{ end }}`)
|
t.addInternalShortcode("highlight.html", `{{ if len .Params | eq 2 }}{{ highlight (trim .Inner "\n\r") (.Get 0) (.Get 1) }}{{ else }}{{ highlight (trim .Inner "\n\r") (.Get 0) "" }}{{ end }}`)
|
||||||
t.addInternalShortcode("test.html", `This is a simple Test`)
|
t.addInternalShortcode("test.html", `This is a simple Test`)
|
||||||
t.addInternalShortcode("figure.html", `<!-- image -->
|
t.addInternalShortcode("figure.html", `<!-- image -->
|
||||||
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
|
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
|
||||||
|
|||||||
Reference in new issue
Block a user