feat(article): use markdownify for licence in article (#273)

* Use markdownify for licence in article

So we can use links, e.g. to credits for main photo.

* refactor: move .article-copyright style to partials/layout/article

Co-authored-by: Jimmy Cai <github@jimmycai.com>
This commit is contained in:
Simon Guest 2021-07-26 05:50:52 +12:00 committed by GitHub
parent dcfc7b5589
commit 44e3d20bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -70,6 +70,12 @@
flex-wrap: wrap; flex-wrap: wrap;
text-transform: unset; text-transform: unset;
} }
.article-copyright {
a {
color: var(--body-text-color);
}
}
} }
} }
} }

View File

@ -4,7 +4,7 @@
{{ if and (.Site.Params.article.license.enabled) (not (eq .Params.license false)) }} {{ if and (.Site.Params.article.license.enabled) (not (eq .Params.license false)) }}
<section class="article-copyright"> <section class="article-copyright">
{{ partial "helper/icon" "copyright" }} {{ partial "helper/icon" "copyright" }}
<span>{{ default .Site.Params.article.license.default .Params.license }}</span> <span>{{ default .Site.Params.article.license.default .Params.license | markdownify }}</span>
</section> </section>
{{ end }} {{ end }}
@ -16,4 +16,4 @@
</span> </span>
</section> </section>
{{- end -}} {{- end -}}
</footer> </footer>