mirror of
https://github.com/yihui/hugo-xmin.git
synced 2024-11-22 00:19:19 +02:00
Cleaner and more specific way to implement comment section for posts
This commit is contained in:
parent
1d034a9c38
commit
c341e4690c
|
@ -34,3 +34,4 @@ footnotereturnlinkcontents = "↩"
|
|||
[params]
|
||||
description = "A website built through Hugo and blogdown."
|
||||
footer = "© [Yihui Xie](https://yihui.name) 2017 -- 2019 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
|
||||
enable_comments = true
|
||||
|
|
|
@ -2,5 +2,3 @@
|
|||
<script async src="//mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
||||
|
||||
<script async src="//yihui.name/js/center-img.js"></script>
|
||||
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{{ partial "header.html" . }}
|
||||
<div class="article-meta">
|
||||
<h1><span class="title">{{ .Title | markdownify }}</span></h1>
|
||||
{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
|
||||
{{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
|
||||
</div>
|
||||
|
||||
<main>
|
||||
{{ .Content }}
|
||||
</main>
|
||||
{{ if .Params.enable_comments }}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ end }}
|
||||
{{ partial "footer.html" . }}
|
Loading…
Reference in New Issue