feat(search): add local search (#231)

* feat(search): add local search

* docs: add docs for search
This commit is contained in:
Dillon
2020-04-15 15:46:50 +08:00
committed by GitHub
parent b6ce753ae7
commit 90184ca3e7
92 changed files with 4843 additions and 1214 deletions

View File

@@ -0,0 +1,13 @@
{{- $content := . -}}
{{- $content = partial "function/ruby.html" $content -}}
{{- $content = partial "function/fraction.html" $content -}}
{{- $content = partial "function/fontawesome.html" $content -}}
{{- $content = partial "function/checkbox.html" $content -}}
{{- $content = partial "function/escape.html" $content -}}
{{- return $content -}}

View File

@@ -3,6 +3,6 @@
{{- /* shuffle md5 as id */ -}}
{{- $id := delimit (split (md5 now.Unix) "" | shuffle | first 6) "" | printf "id-%s" -}}
{{- with .scratch -}}
{{- .SetInMap "contentMap" $id $.content -}}
{{- .SetInMap "contentData" $id $.content -}}
{{- end -}}
{{- return $id -}}