diff --git a/README.md b/README.md index 60404f8..fe4be63 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Maupassant theme, ported to Hugo. 15. See Also 支持 16. Disqus评论支持 18. 自定义css、js -19. utteranc评论 +19. utteranc和[waline](https://waline.js.org)评论 20. 部分自定义的shortcode 21. 文章自定义摘要 22. 自定义广告支持 @@ -295,6 +295,18 @@ summaryLength = 140 3. `title` 按页面title标题的方式。 其他还有几个不常用,这里就不再赘述了。 +#### Waline 评论系统 +Waline一款从 Valine 衍生的带后端评论系统。快速、安全、免费部署、支持评论通知。详见[https://waline.js.org/](https://waline.js.org/) + +将```enable```值改为```true```即可启用 + +```serverURL```可根据官网部署教程获取 +```toml +[params.waline] + enable = false + placeholder = "说点什么吧..." + serverURL = "Your waline serverURL" #换成你的serverURL +``` #### 不蒜子页面计数器支持 @@ -445,6 +457,24 @@ disablePathToLower = true } ``` ``` +#### 支持在首页上隐藏某篇文章 + +将 front matter 中的```hiddenFromHomePage```设置为```true``` 即可 + + *默认为```false```* + +```toml ++++ +title = '{{ replace .Name "-" " " | title }}' +tags = [] +categories = [] +date = "{{ .Date }}" +toc = true +draft = true +hiddenFromHomePage = false ++++ + +``` ## 贡献 diff --git a/README_EN.md b/README_EN.md index 14debfd..b61ae77 100644 --- a/README_EN.md +++ b/README_EN.md @@ -138,6 +138,32 @@ summaryLength = 140 ```toml disqusShortname = "yourdiscussshortname" +``` +#### Waline comment system +See [https://waline.js.org/](https://waline.js.org/) + +```toml +[params.waline] + enable = false + placeholder = "说点什么吧..." + serverURL = "Your waline serverURL" +``` + +#### Hide some articles on the homepage + +Change the value of ```hiddenFromHomePage``` to ```true``` to enable + +```toml ++++ +title = '{{ replace .Name "-" " " | title }}' +tags = [] +categories = [] +date = "{{ .Date }}" +toc = true +draft = true +hiddenFromHomePage = false ++++ + ``` #### Page View Support diff --git a/archetypes/default.md b/archetypes/default.md index 5117679..ea415ed 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -5,4 +5,5 @@ categories=[] date="{{ .Date }}" toc=true draft=true +hiddenFromHomePage= false +++ diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0a27042..5f5a731 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -67,7 +67,11 @@ disqusShortname = "yourdiscussshortname" ## 是否开启disqus评论,不要 repo = "your github repo" ##换成自己得 issueTerm = "pathname" theme = "github-light" - +## 配置 waline 评论系统,教程参考 https://waline.js.org/ +[params.waline] + enable = false + placeholder = "说点什么吧..." + serverURL = "Your waline serverURL" #换成你的serverURL ## 开启版权声明,协议名字和链接都可以换 [params.cc] name = "知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议" diff --git a/layouts/index.html b/layouts/index.html index 9793057..468b9ea 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,6 +2,7 @@