diff options
| author | 2024-08-02 13:23:35 +0800 | |
|---|---|---|
| committer | 2024-08-02 13:23:35 +0800 | |
| commit | e03422873a1788137f120d9c8f34b2be079f0aee (patch) | |
| tree | f52775951aed0c594a6b1ca4c9432f3bba74ecac /themes/hugo-xmag/layouts/partials/author.html | |
| parent | 2b8db24f956ad99305860c2f8f4cd3a331a76dc6 (diff) | |
| download | journal-e03422873a1788137f120d9c8f34b2be079f0aee.tar.gz journal-e03422873a1788137f120d9c8f34b2be079f0aee.zip | |
docs: build with hugo
Diffstat (limited to 'themes/hugo-xmag/layouts/partials/author.html')
| -rw-r--r-- | themes/hugo-xmag/layouts/partials/author.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/themes/hugo-xmag/layouts/partials/author.html b/themes/hugo-xmag/layouts/partials/author.html new file mode 100644 index 0000000..c4977ab --- /dev/null +++ b/themes/hugo-xmag/layouts/partials/author.html @@ -0,0 +1,25 @@ +{{ with .Params.author }} +{{ if eq (substr (jsonify .) 0 1) "["}} +{{ $.Scratch.Set "page_author" .}} +{{ else }} +{{ $.Scratch.Set "page_author" (slice .) }} +{{ end }} + +{{ $.Scratch.Set "author_info" slice }} +{{ if $.Site.Data.authors }} +{{ range $.Scratch.Get "page_author" }} +{{ with (index $.Site.Data.authors .) }} +{{ $.Scratch.Add "author_info" . }} +{{ end }} +{{ end }} +{{ end }} +{{ if $.Scratch.Get "author_info" }} +<section class="article-meta article-footer"> + <h3>{{ default "About the Author" $.Site.Params.text.about_author }}</h3> + {{ range $.Scratch.Get "author_info" }} + <p>{{ . | markdownify }}</p> + {{ end }} +</section> +{{ end }} + +{{ end }} |