mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 09:12:47 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
24af405e73
22
CHANGELOG.md
Normal file
22
CHANGELOG.md
Normal file
@ -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)
|
@ -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.
|
||||
|
@ -4,7 +4,9 @@
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<article class="{{ $.Param "post_article_class" | default "flex-l flex-wrap justify-between mw8 center ph3 ph0-l"}}">
|
||||
|
||||
{{ $section := .Site.GetPage "section" .Section }}
|
||||
<article class="{{ .Site.Param.post_article_class | default "flex-l flex-wrap justify-between mw8 center ph3 ph0-l"}}">
|
||||
|
||||
<header class="mt4 w-100">
|
||||
<p class="f6 b helvetica tracked">
|
||||
@ -20,10 +22,20 @@
|
||||
{{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
|
||||
<time class="f6 mv4 dib tracked" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||
{{- .Date.Format "January 2, 2006" -}}
|
||||
</time>
|
||||
</time>
|
||||
{{/*
|
||||
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) )}}
|
||||
<span class="f6 mv4 dib tracked"> - {{ .ReadingTime}} minutes read</span>
|
||||
<span class="f6 mv4 dib tracked"> - {{ .WordCount}} words</span>
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
<main class="{{ $.Param "post_main_class" | default "nested-copy-line-height lh-copy f4 nested-links nested-img mid-gray pr4-l w-two-thirds-l" }}">
|
||||
<main class="{{ .Site.Param.post_main_class | default "nested-copy-line-height lh-copy f4 nested-links nested-img mid-gray pr4-l w-two-thirds-l" }}">
|
||||
{{- .Content -}}
|
||||
{{- partial "tags.html" . -}}
|
||||
<div class="mt6">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<footer class="bg-near-black bottom-0 w-100 pa3" role="contentinfo">
|
||||
<footer class="{{ .Site.Params.background_color_class | default "bg-black" }} bottom-0 w-100 pa3" role="contentinfo">
|
||||
<div class="flex justify-between">
|
||||
<a class="f4 fw4 hover-white no-underline white-70 dn dib-ns pv2 ph3" href="{{ .Site.BaseURL }}" >
|
||||
© {{ now.Format "2006" }} {{ .Site.Title }}
|
||||
|
@ -1,9 +1,9 @@
|
||||
{{ $featured_image := .Param "featured_image" | default "images/gohugo-default-sample-hero-image.jpg" }}
|
||||
{{ $featured_image := .Param "featured_image"}}
|
||||
{{ if $featured_image }}
|
||||
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
|
||||
{{ $featured_image := (trim $featured_image "/") | absURL }}
|
||||
<header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
|
||||
<div class="bg-black-60">
|
||||
<div class="{{ .Site.Params.cover_dimming_class | default "bg-black-60" }}">
|
||||
{{ partial "site-navigation.html" .}}
|
||||
<div class="tc-l pv4 pv6-l ph3 ph4-ns">
|
||||
<h1 class="f2 f-subheadline-l fw2 white-90 mb0 lh-title">
|
||||
|
Loading…
x
Reference in New Issue
Block a user