mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2025-10-09 10:11:14 +00:00
Refactored template code
This commit is contained in:
parent
b28e531f9f
commit
c3e09727a6
20 changed files with 332 additions and 395 deletions
8
layouts/partials/reading_time.html
Normal file
8
layouts/partials/reading_time.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<!-- Reading Time -->
|
||||
{{ $readTime := mul (div (countwords .Content) 220.0) 60 }}
|
||||
{{ if gt $readTime 60 }}
|
||||
<p>
|
||||
Reading Time:
|
||||
{{ math.Ceil (div $readTime 60) }} minutes.
|
||||
</p>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue