diff options
author | mblum <me@mblum.me> | 2017-07-06 06:27:48 +0300 |
---|---|---|
committer | mblum <me@mblum.me> | 2017-07-06 06:34:31 +0300 |
commit | b43e6bb501972a65024388e67445a78a3db0eaef (patch) | |
tree | 76972e92260c0721f05af6fcd2e17393ba01a3ac | |
parent | 55928adcdff1a87fdea85abbdc327bad35cdf636 (diff) |
[THEME] Hugo Now: a port of Jekyll Now #273 - converted YAMl to TOML, fixed Google Analytics, and moved screenshots
-rw-r--r-- | README.md | 51 | ||||
-rw-r--r-- | exampleSite/config.toml | 26 | ||||
-rw-r--r-- | exampleSite/config.yaml | 27 | ||||
-rw-r--r-- | exampleSite/content/post/javascript-support.md | 2 | ||||
-rw-r--r-- | images/screenshot.png (renamed from static/images/screenshot.png) | bin | 135518 -> 135518 bytes | |||
-rw-r--r-- | images/tn.png (renamed from static/images/tn.png) | bin | 106499 -> 106499 bytes | |||
-rw-r--r-- | layouts/partials/analytics.html | 16 | ||||
-rw-r--r-- | theme.toml | 6 |
8 files changed, 57 insertions, 71 deletions
@@ -1,6 +1,6 @@ # Hugo Now -![Hugo Now](https://raw.githubusercontent.com/mikeblum/hugo-now/master/static/images/hugo-now.png) +![Hugo Now](https://raw.githubusercontent.com/mikeblum/hugo-now/master/static/logo/hugo-now.png) A Hugo port of [Jekyll Now](https://github.com/barryclark/jekyll-now). The Hugo implementation is inspired by [Hemingway](https://github.com/tanksuzuki/hemingway). @@ -92,34 +92,35 @@ Your `.gitmodules` should now contain: ## Configure -`config.yaml` +`config.toml` -``` ---- -baseurl: -languageCode: en -title: +```toml +baseurl = "http://example.org/" +languageCode = "en-us" +title = "My New Hugo Site" # theme -theme: "hugo-now" - -taxonomies: - category: "categories" - tag: "tags" - -params: - description: - author: - keywords: [] - avatar: /images/profile.jpg - displayauthor: false +theme = "hugo-now" +# Comment the themesDir option if you use this theme in production +themesDir = "../.." +# google analytics +GoogleAnalytics = "UA-XXXXXX" + +[taxonomies] + category = "categories" + tag = "tags" + +[params] + description = "Hugo port of Jekyll Now" + author = "Hugo Now" + keywords = ["hugo-now", "hugo"] + avatar = "/images/hugo.png" + displayauthor = false # pygments - PygmentsUseClasses: true - PygmentsCodeFences: true + PygmentsUseClasses = true + PygmentsCodeFences = true # pagination - paginate: 10 - paginatePath: page - # google analytics - GoogleAnalytics: UA-XXXXXX + paginate = 10 + paginatePath = "page" ``` ## Content diff --git a/exampleSite/config.toml b/exampleSite/config.toml new file mode 100644 index 0000000..a6aa135 --- /dev/null +++ b/exampleSite/config.toml @@ -0,0 +1,26 @@ +baseurl = "http://example.org/" +languageCode = "en-us" +title = "My New Hugo Site" +# theme +theme = "hugo-now" +# Comment the themesDir option if you use this theme in production +themesDir = "../.." +# google analytics +GoogleAnalytics = "UA-XXXXXX" + +[taxonomies] + category = "categories" + tag = "tags" + +[params] + description = "Hugo port of Jekyll Now" + author = "Hugo Now" + keywords = ["hugo-now", "hugo"] + avatar = "/images/hugo.png" + displayauthor = false + # pygments + PygmentsUseClasses = true + PygmentsCodeFences = true + # pagination + paginate = 10 + paginatePath = "page" diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml deleted file mode 100644 index eca0b4d..0000000 --- a/exampleSite/config.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -baseurl: "http://example.org/" -languageCode: en -title: My New Hugo Site -# theme -theme: "hugo-now" -# Comment the themesDir option if you use this theme in production -themesDir: ../.. - -taxonomies: - category: "categories" - tag: "tags" - -params: - description: Hugo port of Jekyll Now - author: Hugo Now - keywords: ["hugo-now", "hugo"] - avatar: /images/hugo.png - displayauthor: false - # pygments - PygmentsUseClasses: true - PygmentsCodeFences: true - # pagination - paginate: 10 - paginatePath: page - # google analytics - # GoogleAnalytics: UA-XXXXXX
\ No newline at end of file diff --git a/exampleSite/content/post/javascript-support.md b/exampleSite/content/post/javascript-support.md index ae6cbd4..de29063 100644 --- a/exampleSite/content/post/javascript-support.md +++ b/exampleSite/content/post/javascript-support.md @@ -26,7 +26,7 @@ tags: ["bootstrap", "javascript", "noscript"] <div id="js-enabled-msg" class="bd-callout bd-callout-success js-enabled"> <h4>Javascript Enabled</h4> - <p>While Hugo Now assumes javascript is disabled, full Bootstrap JS is supported</p>p> + <p>While Hugo Now assumes javascript is disabled, full Bootstrap JS is supported</p> <p>(see <code>partials/javascript.html</code>)</p> </div> diff --git a/static/images/screenshot.png b/images/screenshot.png Binary files differindex 9118078..9118078 100644 --- a/static/images/screenshot.png +++ b/images/screenshot.png diff --git a/static/images/tn.png b/images/tn.png Binary files differindex bb384ce..bb384ce 100644 --- a/static/images/tn.png +++ b/images/tn.png diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index 191524e..f0cc01c 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -1,15 +1 @@ -{{ if $.Param "GoogleAnalytics" }} -<!-- Google Analytics --> -<script> -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) -})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); - -ga('create', '{{ $.Param "GoogleAnalytics" }}', 'auto'); -ga('send', 'pageview'); -</script> -<!-- End Google Analytics --> -{{ else }} -<!-- Google Analytics disabled --> -{{ end }}
\ No newline at end of file +{{ template "_internal/google_analytics.html" . }}
\ No newline at end of file @@ -5,9 +5,9 @@ name = "Hugo Now" license = "MIT" licenselink = "https://github.com/mikeblum/hugo-now/blob/master/LICENSE.md" description = "a Hugo port of Jekyll Now" -homepage = "http://siteforthistheme.com/" -tags = [blog, profile, jekyll-now, bootstrap, font awesome, responsive, pygments] -features = [blog, portfolio] +homepage = "https://github.com/mikeblum/hugo-now" +tags = ["blog", "profile", "jekyll-now", "bootstrap", "font awesome", "responsive", "pygments"] +features = ["blog", "portfolio"] min_version = 0.24 [author] |