diff --git a/exampleSite/content/docs/multi-author/index.md b/exampleSite/content/docs/multi-author/index.md index acc0f942..c1f433fa 100644 --- a/exampleSite/content/docs/multi-author/index.md +++ b/exampleSite/content/docs/multi-author/index.md @@ -32,16 +32,16 @@ _Note: the key in the social object will be used to fetch one of the theme’s i "name": "Nuno Coração", "image" : "img/nuno_avatar.jpg", "bio": "Theme Creator", - "social": { - "linkedin": "https://linkedin.com/in/nunocoracao", - "twitter": "https://twitter.com/nunocoracao", - "instagram": "https://instagram.com/nunocoracao", - "medium": "https://medium.com/@nunocoracao", - "github": "https://github.com/nunocoracao", - "goodreads": "http://goodreads.com/nunocoracao", - "keybase": "https://keybase.io/nunocoracao", - "reddit": "https://reddit.com/user/nunoheart" - } + "social": [ + { "linkedin": "https://linkedin.com/in/nunocoracao" }, + { "twitter": "https://twitter.com/nunocoracao" }, + { "instagram": "https://instagram.com/nunocoracao" }, + { "medium": "https://medium.com/@nunocoracao" }, + { "github": "https://github.com/nunocoracao" }, + { "goodreads": "http://goodreads.com/nunocoracao" }, + { "keybase": "https://keybase.io/nunocoracao" }, + { "reddit": "https://reddit.com/user/nunoheart" } + ] } ``` @@ -99,4 +99,4 @@ Nuno's awesome dummy bio. This sample sample below shows an example where the default site author is turned off and the article has multiple authors. -{{< article link="/blowfish/samples/multiple-authors/" >}} \ No newline at end of file +{{< article link="/samples/multiple-authors/" >}} \ No newline at end of file diff --git a/exampleSite/data/authors/nunocoracao.json b/exampleSite/data/authors/nunocoracao.json index ecf62ede..ca8170ba 100644 --- a/exampleSite/data/authors/nunocoracao.json +++ b/exampleSite/data/authors/nunocoracao.json @@ -2,14 +2,14 @@ "name": "Nuno Coração", "image" : "img/nuno_avatar.jpg", "bio": "Theme Creator", - "social": { - "linkedin": "https://linkedin.com/in/nunocoracao", - "twitter": "https://twitter.com/nunocoracao", - "instagram": "https://instagram.com/nunocoracao", - "medium": "https://medium.com/@nunocoracao", - "github": "https://github.com/nunocoracao", - "goodreads": "http://goodreads.com/nunocoracao", - "keybase": "https://keybase.io/nunocoracao", - "reddit": "https://reddit.com/user/nunoheart" - } + "social": [ + { "linkedin": "https://linkedin.com/in/nunocoracao" }, + { "twitter": "https://twitter.com/nunocoracao" }, + { "instagram": "https://instagram.com/nunocoracao" }, + { "medium": "https://medium.com/@nunocoracao" }, + { "github": "https://github.com/nunocoracao" }, + { "goodreads": "http://goodreads.com/nunocoracao" }, + { "keybase": "https://keybase.io/nunocoracao" }, + { "reddit": "https://reddit.com/user/nunoheart" } + ] } \ No newline at end of file diff --git a/exampleSite/data/authors/secondauthor.json b/exampleSite/data/authors/secondauthor.json index 98d77afd..3959dacc 100644 --- a/exampleSite/data/authors/secondauthor.json +++ b/exampleSite/data/authors/secondauthor.json @@ -2,14 +2,14 @@ "name": "Dummy Second Author", "image" : "img/author2.png", "bio": "Dummy", - "social": { - "linkedin": "https://linkedin.com/in/nunocoracao", - "twitter": "https://twitter.com/nunocoracao", - "instagram": "https://instagram.com/nunocoracao", - "medium": "https://medium.com/@nunocoracao", - "github": "https://github.com/nunocoracao", - "goodreads": "http://goodreads.com/nunocoracao", - "keybase": "https://keybase.io/nunocoracao", - "reddit": "https://reddit.com/user/nunoheart" - } + "social": [ + { "linkedin": "https://linkedin.com/in/nunocoracao" }, + { "twitter": "https://twitter.com/nunocoracao" }, + { "instagram": "https://instagram.com/nunocoracao" }, + { "medium": "https://medium.com/@nunocoracao" }, + { "github": "https://github.com/nunocoracao" }, + { "goodreads": "http://goodreads.com/nunocoracao" }, + { "keybase": "https://keybase.io/nunocoracao" }, + { "reddit": "https://reddit.com/user/nunoheart" } + ] } \ No newline at end of file diff --git a/layouts/partials/article-link.html b/layouts/partials/article-link.html index 36010d06..06dfb4e3 100644 --- a/layouts/partials/article-link.html +++ b/layouts/partials/article-link.html @@ -1,27 +1,27 @@ {{ $articleClasses := "flex flex-wrap article" }} {{ if .Site.Params.list.showCards }} - {{ $articleClasses = delimit (slice $articleClasses "border" "border-neutral-200 dark:border-neutral-700 border-2 rounded-md") " " }} +{{ $articleClasses = delimit (slice $articleClasses "border" "border-neutral-200 dark:border-neutral-700 border-2 rounded-md") " " }} {{ end }} {{ $articleImageClasses := "w-full md:w-auto h-full thumbnail nozoom" }} {{ if .Site.Params.list.showCards }} - {{ $articleImageClasses = delimit (slice $articleImageClasses "") " " }} +{{ $articleImageClasses = delimit (slice $articleImageClasses "") " " }} {{ else }} - {{ $articleImageClasses = delimit (slice $articleImageClasses "thumbnailshadow md:mr-7") " " }} +{{ $articleImageClasses = delimit (slice $articleImageClasses "thumbnailshadow md:mr-7") " " }} {{ end }} {{ $articleInnerClasses := "" }} {{ if .Site.Params.list.showCards }} - {{ $articleInnerClasses = delimit (slice $articleInnerClasses "p-4") " " }} +{{ $articleInnerClasses = delimit (slice $articleInnerClasses "p-4") " " }} {{ else }} - {{ $articleInnerClasses = delimit (slice $articleInnerClasses "mt-3 md:mt-0") " " }} +{{ $articleInnerClasses = delimit (slice $articleInnerClasses "mt-3 md:mt-0") " " }} {{ end }} {{ with .Params.externalUrl }} -{{ else }} - -{{ end }} + {{ else }} + + {{ end }} {{- with $.Params.images -}} {{- range first 6 . }} {{ end -}} @@ -30,9 +30,9 @@ {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- with $featured -}} - {{ with .Resize "600x" }} + {{ with .Resize "600x" }}
- {{ end }} + {{ end }} {{- else -}} {{- with $.Site.Params.images }} {{ end -}} @@ -52,7 +52,6 @@ - {{ else }}
{{ end }}
-
+ \ No newline at end of file diff --git a/layouts/partials/article-meta.html b/layouts/partials/article-meta.html index e3ed1072..3d75b98a 100644 --- a/layouts/partials/article-meta.html +++ b/layouts/partials/article-meta.html @@ -59,6 +59,19 @@ {{ end }} +{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }} +
+ {{ range $taxonomy, $terms := .Site.Taxonomies }} + {{ if (eq $taxonomy "authors")}} + {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} + {{ range $i, $a := $context.GetTerms $taxonomy }} + {{ if not (eq $i 0) }} ,  {{ end }}
{{ $a.LinkTitle }}
+ {{ end }} + {{ end }} + {{ end }} + {{ end }} +
+{{ end }} {{/* Output taxonomies */}} {{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }} @@ -77,21 +90,4 @@ {{ end }} - -{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }} -
- {{ range $taxonomy, $terms := .Site.Taxonomies }} - {{ if (eq $taxonomy "authors")}} - {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} - {{ range $context.GetTerms $taxonomy }} - - {{ partial "badge.html" .LinkTitle }} - - {{ end }} - {{ end }} - {{ end }} - {{ end }} -
-{{ end }} - {{ end }} \ No newline at end of file diff --git a/layouts/partials/author-extra.html b/layouts/partials/author-extra.html index 4ae1991a..a191f21f 100644 --- a/layouts/partials/author-extra.html +++ b/layouts/partials/author-extra.html @@ -22,10 +22,12 @@ {{ end }}
- {{ range $name, $link := .data.social }} + {{ range .data.social }} + {{ range $name, $link := . }} {{ partial "icon.html" $name }} {{ end }} + {{ end }}
diff --git a/layouts/partials/meta/likes_button.html b/layouts/partials/meta/likes_button.html index 43ac61f1..a090614d 100644 --- a/layouts/partials/meta/likes_button.html +++ b/layouts/partials/meta/likes_button.html @@ -1,7 +1,6 @@