feat(comment): add comment for single page and emoji config for Valine (#328)

This commit is contained in:
Dillon
2020-05-06 23:11:34 +08:00
committed by GitHub
parent f4c9fe750d
commit 2513afbd54
12 changed files with 624 additions and 1 deletions

View File

@@ -50,6 +50,7 @@
{{- with $valine.serverURLs -}}
{{- $commentConfig = dict "serverURLs" . | dict "valine" | merge $commentConfig -}}
{{- end -}}
{{- $commentConfig = $valine.emoji | default "facebook.yml" | printf "data/emoji/%s" | resources.Get | transform.Unmarshal | dict "valine" | merge $commentConfig -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://valine.js.org/">Valine</a>.
</noscript>

View File

@@ -41,7 +41,7 @@
{{- if $profile.social -}}
<div class="social-links">
{{- $socialMap := resources.Get "data/social.yaml" | transform.Unmarshal -}}
{{- $socialMap := resources.Get "data/social.yml" | transform.Unmarshal -}}
{{- $socialArr := slice -}}
{{- range $key, $value := .Site.Params.social -}}
{{- $social := $key | lower | index $socialMap | default dict -}}