feat(shortcode): add link shortcode (#179)

* feat(shortcode): add link shortcode

* docs: add docs for link shortcode

* docs: fix 'mailto' in link shortcode docs error
This commit is contained in:
Dillon
2020-03-17 21:16:04 +08:00
committed by GitHub
parent f9dba2e36c
commit 6b03c711ac
30 changed files with 375 additions and 252 deletions

View File

@@ -19,8 +19,8 @@
{{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
<span class="post-author">
{{- $link := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
{{- partial "plugin/link.html" $link -}}
{{- $options := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
{{- partial "plugin/link.html" $options -}}
</span>
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}