diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..c962b4c --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,5 @@ +## 2017.12.09 Version 1.0 + +- [x] Support twitter card. +- [x] Remove name in `.Site.Params`. It's duplicate with `.Site.title`. +- [x] Add `author` in `.Site.Params`. diff --git a/README.md b/README.md index 5bdfa63..e7d268b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Hogu Theme Cactus Plus +[English Document](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md) + Cactus Plus is a minimalistic theme for bloggers based on the theme named [Cactus](https://github.com/digitalcraftsman/hugo-cactus-theme). **Features** @@ -10,10 +12,10 @@ Cactus Plus is a minimalistic theme for bloggers based on the theme named [Cactu + **[Disqus](https://disqus.com/) comment-system** + **Both Google Analytics and Baidu Analytics for site analytics.** + **Table of Content** ++ **Twitter Card** Here's the link to online demo: [http://nodejh.com](http://nodejh.com). -[English Document](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md) diff --git a/README_zh-cn.md b/README_zh-cn.md index b6f4dd8..17c982a 100644 --- a/README_zh-cn.md +++ b/README_zh-cn.md @@ -1,5 +1,7 @@ # Hugo Theme Cactus Plus +[English Document](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md) + Cactus Plus 是在 [Cactus](https://github.com/digitalcraftsman/hugo-cactus-theme) 更改的一个简约主题。 **特点** @@ -10,10 +12,11 @@ Cactus Plus 是在 [Cactus](https://github.com/digitalcraftsman/hugo-cactus-them + **集成了 [Disqus](https://disqus.com/) 评论系统** + **提供了 Google Analytics 和百度统计** + **文章目录** ++ **Twitter Card** 示例网站: [http://nodejh.com](http://nodejh.com)。 -[English Document](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md) + diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0c66b4e..72a08c4 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,39 +1,40 @@ # Site settings -baseurl = "http://nodejh.com/" -languageCode = "zh-cn" -title = "nodejh" +baseurl = "your_site_url_address" +languageCode = "en" +title = "site title" theme = "hugo-theme-cactus-plus" -# Enter your tracking code to enable Google Analytics -googleAnalytics = "UA-84989670-1" -hasCJKLanguage = true +googleAnalytics = "your_google_analytics_id" +# Set the value to true if your site include CJK (Chinese, Japanese, and Korean languages) characters +hasCJKLanguage = false [params] - name = "nodejh" - description = "My Blog" - bio = "Web Developer" + author = "site_author" + description = "Site Description" + bio = "author biography" - enableRSS = true + twitter = "your_twitter_id" + facebook = "your_facebook_id" - # Table of content + enableRSS = true enableToc = true - # Disqus comment - disqusShortname = "nodejh" - # Enable disqus comment, true|false enableDisqus = true + disqusShortname = "your_disqus_short_name" + - # Enable summary, true|false enableSummary = true - # Use posts' front matter description replace summary, true|false + # Set the value to true if use description in post front matter replace content summary useDescriptionReplaceSummary = false - # Enable Google Analytics + enableGoogleAnalytics = true + enableBaiduAnalytics = false + # Set the value to your baidu analysis code if you want to use baidu analytics + baiduAnalytics = 'your_baidu_analysis_code' - # Enable Baidu Analytics - enableBaiduAnalytics = true - # Baidu Analytics Code - baiduAnalytics = '39843ea392201290bd6f76173d2e1633' + enableTwitterCard = true + # The url for twitter card image, default is avatar.png in static/images directory + twitterCardImage = "" # Add custom assets with their paths relative to the static folder customCSS = [] @@ -43,36 +44,23 @@ hasCJKLanguage = true # translate or customize each string of the theme. # Navigation links - # Home text, default: 'Home' home = "" - # About text, default: 'About' about = "" - # Archive text, default: 'Archive' archive = "" - # Subscribe button Text, default: 'Subscribe' subscribe = "" - # Pagination links - # default: 'Older Posts' olderPosts = "" - # default: 'Newer Posts' newerPosts = "" + copyright = "" - # show latest posts in single page, true|false + # show latest posts in single page showLatestPosts = false - # Latest posts title, default: 'Read More' readMore = "" - # default similar to: © Copyright 2017 ❤️ nodejh - # nodejh is site name specified in params.name - copyright = "" - - # Enable Share Button at bottom of post, true|false - enableShare = false - # Enter optionally your twitter account - twitterAccount = "" + # Share + enableShare = true tweet = "" - facebook = "" + share = "" # 404 page title404 = "" @@ -83,6 +71,7 @@ hasCJKLanguage = true # The social icons can be styled differently if you use mono as font - circle, rounded, or empty socialIconStyle = "" + # Add additional social link entries underneath [social] facebook-square = "https://www.facebook.com/nodejh" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1dbd8c2..29b95c9 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,4 +1,4 @@ - {{ partial "head.html" . }} +{{ partial "head.html" . }}
{{ partial "nav.html" . }} {{ partial "profile.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ff10768..0bd5424 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,4 +1,4 @@ - {{ partial "head.html" . }} +{{ partial "head.html" . }} {{ partial "nav.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c6826f0..8c8a7c4 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -6,7 +6,7 @@ {{ with .Site.Params.copyright }} {{ . | markdownify }} {{ else }} - © Copyright {{ now.Format "2006"}} {{ .Site.Params.name }} + © Copyright {{ now.Format "2006"}} {{ .Site.Params.Author }} {{ end }}diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b701eb3..74e5e49 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,16 +4,16 @@ - {{ with .Site.Params.name }}{{ end }} + {{ if .Site.Params.enableTwitterCard }} + {{ partial "twitter-cards.html" . }} + {{ end }} + {{ with .Site.Params.author }}{{ end }} {{ with .Site.Params.description }}{{ end }} {{ .Hugo.Generator }}