feat(syntax): add fraction syntax (#181)
* feat(syntax): add fraction syntax * docs: add remind for Hugo extended version
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
exThumbImage: 'data-thumbnail',
|
||||
thumbWidth: 80,
|
||||
thumbContHeight: 80,
|
||||
actualSize: false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
5
layouts/partials/function/fraction.html
Normal file
5
layouts/partials/function/fraction.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- /* Fraction */ -}}
|
||||
{{- /* [A]/[B] -> <sup>A</sup>/<sub>B</sub> */ -}}
|
||||
{{- $REin := `\[(.+?)\]/\[(.+?)\]` -}}
|
||||
{{- $REout := `<sup>$1</sup>/<sub>$2</sub>` -}}
|
||||
{{- return replaceRE $REin $REout . -}}
|
||||
@@ -1,9 +1,11 @@
|
||||
{{- $content := . -}}
|
||||
|
||||
{{- $content = partial "function/fontawesome.html" $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 -}}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
{{- else if eq $taxonomies "tags" -}}
|
||||
<div class="tag-cloud-tags">
|
||||
{{- range $.Site.Taxonomies.tags.ByCount -}}
|
||||
<a href="{{ .Page.RelPermalink }}"> {{ .Page.Title }} <small>({{ .Count }})</small></a>
|
||||
<a href="{{ .Page.RelPermalink }}"> {{ .Page.Title }} <sup>{{ .Count }}</sup></a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user