feat(comments): prepare for more third party comments system integration

This commit is contained in:
Jimmy Cai 2020-09-08 23:30:15 +02:00
parent b66679d36a
commit c546964ce4
No known key found for this signature in database
GPG key ID: 3EA408E527F37B18
7 changed files with 19 additions and 2 deletions

View file

@ -0,0 +1,6 @@
.comments-container {
background-color: var(--card-background);
border-radius: var(--card-border-radius);
@include box_shadow(1);
padding: var(--content-padding);
}

View file

@ -15,6 +15,8 @@
@import "partials/layout/taxonomy.scss";
@import "partials/layout/404.scss";
@import "partials/comments/base.scss";
a {
text-decoration: none;
color: var(--accent-color);

View file

@ -19,6 +19,10 @@ title = "Example Site"
[params.article.license]
enabled = true
default = "Licenced under CC BY-NC-SA 4.0"
[params.comments]
enabled = true
# Only Disqus is available so far
provider = "disqus"
[params.widgets]
enabled = ['archive', 'tag-cloud']
[params.widgets.archive]

View file

@ -17,7 +17,7 @@
{{ partial "article/components/related-contents" . }}
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
{{ partial "article/components/comment" . }}
{{ partial "comments/include" . }}
{{ end }}
{{ partialCached "footer" . }}

View file

@ -8,7 +8,7 @@
{{ partial "article/article.html" . }}
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
{{ partial "article/components/comment" . }}
{{ partial "comments/include" . }}
{{ end }}
{{ partialCached "footer" . }}

View file

@ -0,0 +1,5 @@
{{ if .Site.Params.comments.enabled }}
<div class="comments-container provider-{{ .Site.Params.comments.provider }}">
{{ partial (printf "comments/provider/%s" .Site.Params.comments.provider) . }}
</div>
{{ end }}