Theme Files Update
This commit is contained in:
parent
7fdf67fab5
commit
559c581dba
5 changed files with 56 additions and 29 deletions
55
hugo.toml
55
hugo.toml
|
@ -1,34 +1,34 @@
|
|||
baseURL = "https://1bl4z3r.github.io/hermit-V2/" # baseURL - The absolute URL (protocol, host, path, and trailing slash) of your published site
|
||||
|
||||
|
||||
#[languages]
|
||||
# [languages.en]
|
||||
# title = 'My blog'
|
||||
# weight = 1
|
||||
# [languages.en.params]
|
||||
# linkedin = 'https://linkedin.com/whoever'
|
||||
# [languages.fr]
|
||||
# title = 'Mon blogue'
|
||||
# weight = 2
|
||||
# [languages.fr.params]
|
||||
# linkedin = 'https://linkedin.com/fr/whoever'
|
||||
# [languages.it]
|
||||
# title = 'Il mio blog'
|
||||
# weight = 3
|
||||
# [languages.fr.params]
|
||||
# linkedin = 'https://linkedin.com/fr/whoever'
|
||||
# defaultContentLanguage - Content without language indicator will default to this language.
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
title = 'Hugo Hermit - V2'
|
||||
[languages.en.params]
|
||||
homeSubtitle = "A minimal and fast theme for Hugo."
|
||||
weight = 1
|
||||
[languages.fr]
|
||||
title = 'Hugo Hermit - V2 (FR)'
|
||||
[languages.fr.params]
|
||||
homeSubtitle = "Un thème minimal et rapide pour Hugo."
|
||||
weight = 2
|
||||
[languages.it]
|
||||
title = 'Hugo Hermit - V2 (IT)'
|
||||
[languages.it.params]
|
||||
homeSubtitle = "Un tema minimale e veloce per Hugo."
|
||||
weight = 3
|
||||
|
||||
defaultContentLanguageInSubdir = true
|
||||
# languageCode - A language tag as defined by RFC 5646. This value is used to populate:
|
||||
# The <language> element in the internal RSS template
|
||||
# The lang attribute of the <html> element in the internal alias template
|
||||
languageCode = "en-us"
|
||||
|
||||
# defaultContentLanguage - Content without language indicator will default to this language.
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
|
||||
# title - Site title
|
||||
title = "Hugo Hermit - V2"
|
||||
# title = "Hugo Hermit - V2"
|
||||
|
||||
# enableGitInfo - Enable .GitInfo object for each page (if the Hugo site is versioned by Git). This will then update the Lastmod parameter for each page using the last git commit date for that content file.
|
||||
#enableGitInfo = true
|
||||
|
@ -53,6 +53,7 @@ enableEmoji = true
|
|||
|
||||
[author]
|
||||
name = "1BL4Z3R"
|
||||
about = "about-hugo"
|
||||
|
||||
[blackfriday]
|
||||
# hrefTargetBlank = true
|
||||
|
@ -74,9 +75,9 @@ enableEmoji = true
|
|||
# images = [""]
|
||||
themeColor = "#494f5c"
|
||||
|
||||
homeSubtitle = "A minimal and fast theme for Hugo."
|
||||
#homeSubtitle = "A minimal and fast theme for Hugo."
|
||||
|
||||
footerCopyright = ' · <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a>'
|
||||
footerCopyright = ' <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a>'
|
||||
# bgImg = "" # Homepage background-image URL
|
||||
|
||||
# Prefix of link to the git commit detail page. GitInfo must be enabled.
|
||||
|
@ -85,7 +86,7 @@ enableEmoji = true
|
|||
# Toggling this option needs to rebuild SCSS, requires Hugo extended version
|
||||
justifyContent = false # Set "text-align: justify" to `.content`.
|
||||
|
||||
relatedPosts = false # Add a related content section to all single posts page
|
||||
relatedPosts = true # Add a related content section to all single posts page
|
||||
|
||||
code_copy_button = true # Turn on/off the code-copy-button for code-fields
|
||||
|
||||
|
@ -109,6 +110,12 @@ enableEmoji = true
|
|||
# You can enable Per-Page MathJax support by adding `mathjax : true` in Page frontmatter
|
||||
global_mathjax = false
|
||||
|
||||
# Toggle Reading time for articles
|
||||
readTime = true
|
||||
|
||||
# Specify Separator between wordCount and readTime
|
||||
readTimeSeparator = "\u002F||\u005C Reading Time:"
|
||||
|
||||
# ---------------------------------------------------
|
||||
# Hugo - V2 specific configurations end
|
||||
# ---------------------------------------------------
|
||||
|
|
10
layouts/partials/readTime.html
Normal file
10
layouts/partials/readTime.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ if .Site.Params.readTime }}
|
||||
{{ .Site.Params.readTimeSeparator }}
|
||||
{{ $rT := mul (div (.WordCount) 220.0) 60 }}
|
||||
{{ $rTH := math.Floor (div $rT 3600) }}
|
||||
{{ $rTM := math.Floor (div (mod $rT 3600) 60) }}
|
||||
{{ $rTS := mod (mod $rT 3600) 60 }}
|
||||
{{ if gt $rTH 0 }}{{ $rTH }}{{ cond (gt $rTH 1) " Hours" " Hour" }}{{- end -}}
|
||||
{{ if gt $rTM 0 }}{{ cond (gt $rTH 0) ", " "" }}{{ $rTM }}{{ cond (gt $rTM 1) " Minutes" " Minute" }}{{- end -}}
|
||||
{{ if gt $rTS 0 }}{{ cond (gt $rTM 0) ", " "" }}{{ $rTS }}{{ cond (gt $rTS 1) " Seconds" " Second" }}{{- end -}}
|
||||
{{ end }}
|
|
@ -46,6 +46,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="feather" width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22.428 14.359c-.326 1.678-2.92 3.513-5.9 3.87-1.554.185-3.084.355-4.715.28-2.668-.122-4.773-.637-4.773-.637 0 .26.016.507.048.739.347 2.633 2.61 2.79 4.755 2.864 2.164.074 4.092-.534 4.092-.534l.089 1.957s-1.514.813-4.211.962c-1.487.082-3.334-.037-5.485-.606C1.664 22.019.862 17.047.738 12.002.702 10.504.726 9.092.726 7.91c0-5.159 3.38-6.67 3.38-6.67C5.809.456 8.733.126 11.774.102h.074c3.04.024 5.967.354 7.671 1.136 0 0 3.38 1.512 3.38 6.671 0 0 .043 3.806-.471 6.449"/><path d="M18.912 8.31v6.247h-2.474V8.494c0-1.278-.538-1.927-1.614-1.927-1.19 0-1.785.77-1.785 2.291v3.319h-2.46V8.858c0-1.521-.596-2.29-1.786-2.29-1.075 0-1.613.648-1.613 1.926v6.063H4.705V8.31c0-1.276.325-2.29.978-3.041.674-.75 1.555-1.136 2.65-1.136 1.266 0 2.225.487 2.86 1.46l.616 1.034.616-1.033c.634-.974 1.593-1.46 2.86-1.46 1.094 0 1.976.384 2.65 1.135.652.75.977 1.765.977 3.041"/></svg>
|
||||
{{- else if (eq .name "rss") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>
|
||||
{{- else if (eq .name "author") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-feather"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>
|
||||
{{- else if (eq .name "scrollup") -}}
|
||||
<svg fill="#3B3E48" width="64px" height="64px" viewBox="-2.4 -2.4 28.80 28.80" id="up-circle" data-name="Flat Color" xmlns="http://www.w3.org/2000/svg" class="icon flat-color" stroke="#3B3E48" stroke-width="0.00024000000000000003"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" stroke="#CCCCCC" stroke-width="0.9600000000000002"><circle id="primary" cx="12" cy="12" r="10" style="fill: #3B3E48;"></circle><path id="secondary" d="M15,14a1,1,0,0,1-.71-.29L12,11.41l-2.29,2.3a1,1,0,0,1-1.42-1.42l3-3a1,1,0,0,1,1.42,0l3,3a1,1,0,0,1,0,1.42A1,1,0,0,1,15,14Z" style="fill: #018574;"></path></g><g id="SVGRepo_iconCarrier"><circle id="primary" cx="12" cy="12" r="10" style="fill: #3B3E48;"></circle><path id="secondary" d="M15,14a1,1,0,0,1-.71-.29L12,11.41l-2.29,2.3a1,1,0,0,1-1.42-1.42l3-3a1,1,0,0,1,1.42,0l3,3a1,1,0,0,1,0,1.42A1,1,0,0,1,15,14Z" style="fill: #018574;"></path></g></svg>
|
||||
{{- else -}}
|
||||
|
|
|
@ -26,8 +26,16 @@
|
|||
{{- with .Params.description }}
|
||||
<p>{{.}}</p>
|
||||
{{- end }}
|
||||
{{- with $.Param "author" }}
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-feather"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>{{ . }}</p>
|
||||
|
||||
{{- if and .Params.author .Params.authorLink}}
|
||||
{{ $relreflink := relref . .Params.authorLink }}
|
||||
<p>{{ partial "svg.html" (dict "context" . "name" "author") }}<a href="{{ $relreflink }}" target="_blank">{{ .Params.author }}</a></p>
|
||||
{{- else if .Params.author }}
|
||||
{{ $relreflink := relref . .Site.Author.about }}
|
||||
<p>{{ partial "svg.html" (dict "context" . "name" "author") }}<a href="{{ $relreflink }}" target="_blank">{{ .Params.author }}</a></p>
|
||||
{{- else }}
|
||||
{{ $relreflink := relref . .Site.Author.about }}
|
||||
<p>{{ partial "svg.html" (dict "context" . "name" "author") }}<a href="{{ $relreflink }}" target="_blank">{{ .Site.Author.name }}</a></p>
|
||||
{{- end }}
|
||||
{{- with .Params.tags }}
|
||||
<p>
|
||||
|
@ -37,7 +45,7 @@
|
|||
{{- end }}
|
||||
</p>
|
||||
{{- end }}
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>{{ i18n "wordCount" . }}</p>
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>{{ i18n "wordCount" . }} {{ partial "readTime.html" . }}</p>
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}
|
||||
{{ if .Lastmod }}
|
||||
{{ if not (eq .Lastmod .Date ) }}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
name = "Hermit-V2"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/Track3/hermit/blob/master/LICENSE"
|
||||
licenselink = "https://github.com/1bl4z3r/hermit-V2/blob/main/LICENSE"
|
||||
description = "A minimal and fast hugo theme for bloggers."
|
||||
homepage = "https://github.com/1bl4z3r/hermit-V2"
|
||||
demosite = "https://1bl4z3r.github.io/hermit-V2/"
|
||||
tags = ["blog", "minimal", "dark", "responsive", fast]
|
||||
tags = ["blog", "minimal", "dark", "responsive", "fast"]
|
||||
features = [
|
||||
"single column",
|
||||
"featured image",
|
||||
|
|
Loading…
Reference in a new issue