diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..81ab210 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + + +## [2.35] - 2018-11-04 (@budparr) + +- Add global background color class to footer (it's already on the header). Fixes #135 + +## [2.34] - 2018-11-03 (@budparr) + +### Added + +- Add a changelog. + +### Changed + +- Run Ananke with Hugo v0.50 +- Remove default background image so users can choose to not use one at all. #133 (cdeguise) +- Add reading time and word count to pages, conditionally if set at global, page, or section level with the `show_reading_time` key. (thanks to @looer for starting) diff --git a/README.md b/README.md index 9a239f9..9975368 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,11 @@ For example, if your css files are `static/css/custom.css` and `static/css/custo custom_css = ["css/custom.css","css/custom2.css"] ``` +### Show Reading Time and Word Contributing + +If you add a key of `show_reading_time` true to either the Config Params, a page or section's front matter, articles will show the reading time and word count. + + ### Nearly finished In order to see your site in action, run Hugo's built-in local server. diff --git a/data/webpack_assets.json b/data/webpack_assets.json index 93cb190..253d14f 100644 --- a/data/webpack_assets.json +++ b/data/webpack_assets.json @@ -1,6 +1,6 @@ { "app": { "js": "js/app.3fc0f988d21662902933.js", - "css": "css/app.ab4b67a3ea25990fa8279f3b7ef08b61.css" + "css": "css/app.955516233bcafa4d2a1c13cea63c7b50.css" } } \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0b5e164..579c5f9 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -24,6 +24,7 @@ enableRobotsTXT = true instagram = "" youtube = "" github = "" + gitlab = "" linkedin = "" # choose a background color from any on this page: http://tachyons.io/docs/themes/skins/ and preface it with "bg-" background_color_class = "bg-black" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7d0b40c..e737b48 100755 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -23,7 +23,7 @@ {{ end }} {{ range .Site.Params.custom_css }} - + {{ end }} {{ block "favicon" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 89b61b2..73ed130 100755 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,6 +4,7 @@ {{ end }} {{ define "main" }} + {{ $section := .Site.GetPage "section" .Section }}
@@ -20,7 +21,17 @@ {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}} + + {{/* + Show "reading time" and "word count" but only if one of the following are true: + 1) A global config `params` value is set `show_reading_time = true` + 2) A section front matter value is set `show_reading_time = true` + 3) A page front matter value is set `show_reading_time = true` + */}} + {{ if (or (eq (.Param "show_reading_time") true) (eq $section.Params.show_reading_time true) )}} + - {{ .ReadingTime}} minutes read + - {{ .WordCount}} words + {{ end }}
diff --git a/layouts/partials/new-window-icon.html b/layouts/partials/new-window-icon.html new file mode 100644 index 0000000..8f422ca --- /dev/null +++ b/layouts/partials/new-window-icon.html @@ -0,0 +1,2 @@ +{{ $new_window_icon_size := "8px" }} +{{ partial "svg/new-window.svg" (dict "size" $new_window_icon_size) }} \ No newline at end of file diff --git a/layouts/partials/site-footer.html b/layouts/partials/site-footer.html index 7295f74..d014f77 100755 --- a/layouts/partials/site-footer.html +++ b/layouts/partials/site-footer.html @@ -1,8 +1,8 @@ -