Theme Files Update

This commit is contained in:
GitHub Action 2023-10-15 12:13:22 +00:00
parent e27a5df3b4
commit 96614011ff
5 changed files with 32 additions and 14 deletions

View file

@ -1,7 +1,5 @@
# Hugo theme Hermit - V2
### Why Am I maintaining a fork?
Initially, when I started my Blog journey, I was enthralled by this very theme and I am using it since. However, original developer has ceased maintaining the theme and it is riddled with many bugs. Hence, I have taken upon myself to maintain this theme.
I fully intend to keep the essence of the theme as-it-is and only add minor updates and squash bugs which may arise.
@ -26,7 +24,23 @@ Or, if your Hugo site is already in git, you can include this repository as a [g
git submodule add https://github.com/1bl4z3r/hermit-V2 themes/hermit-v2
```
# Original README follows below
### Custom CSS and JS
I have found that there are some requirement where custom CSS and JS should be supplied to a page to make it work. This custom files are not required for whole of the site, but is restricted to a page or few particular pages. E.g. If you make contact form.
To provision for the same, I have added custom css and js. Please add this to page frontmatter as required.
```
custom_css = ["css/foo.css","css/bar.css"]
custom_js = ["js/custom-about.js"]
```
The files itself will reside in `static/css` for CSS files and `static/js` for JS files. Refer to [Staging Branch](https://github.com/1bl4z3r/hermit-V2/tree/staging) to have a feel on how [this](https://github.com/1bl4z3r/hermit-V2/blob/staging/content/about-hugo.md) is implemented.
---
# Original README
Hermit is a minimal and fast theme for Hugo. It's built for bloggers who want a simple and focused website.

View file

@ -6,19 +6,19 @@ defaultContentLanguage = "en"
[languages]
[languages.en]
title = 'Hugo Hermit - V2'
title = 'Hermit - V2'
[languages.en.params]
homeSubtitle = "A minimal and fast theme for Hugo."
homeSubtitle = "Continuing Hermit's legacy to be minimal and fast theme"
weight = 1
[languages.fr]
title = 'Hugo Hermit - V2 (FR)'
title = 'Hermit - V2 (FR)'
[languages.fr.params]
homeSubtitle = "Un thème minimal et rapide pour Hugo."
homeSubtitle = "Poursuivre l'héritage d'Hermit avec un thème minimal et rapide"
weight = 2
[languages.it]
title = 'Hugo Hermit - V2 (IT)'
title = 'Hermit - V2 (IT)'
[languages.it.params]
homeSubtitle = "Un tema minimale e veloce per Hugo."
homeSubtitle = "Continuare l'eredità di Hermit di essere un tema minimale e veloce"
weight = 3
defaultContentLanguageInSubdir = true
@ -27,13 +27,11 @@ defaultContentLanguageInSubdir = true
# The lang attribute of the <html> element in the internal alias template
languageCode = "en-us"
# title - Site title
# title = "Hugo Hermit - V2"
# title = "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
pygmentsCodefences = true
pygmentsUseClasses = true
@ -75,7 +73,7 @@ enableEmoji = true
# images = [""]
themeColor = "#494f5c"
#homeSubtitle = "A minimal and fast theme for Hugo."
#homeSubtitle = "Continuing Hermit's legacy to be minimal and fast theme"
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View file

@ -17,6 +17,9 @@
{{ end -}}
{{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" {{ printf "integrity=%q" $style.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous">
{{- range .Params.custom_css }}
<link rel="stylesheet" href="{{ . | absURL }}">
{{- end }}
{{- block "head" . -}}{{- end }}
{{- if templates.Exists "partials/extra-head.html" -}}
{{ partial "extra-head.html" . }}
@ -37,6 +40,9 @@
{{ $script := $main | minify | fingerprint -}}
<script async src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
{{ end }}
{{ range .Params.custom_js -}}
<script type="text/javascript" src="{{ . | absURL }}"></script>
{{- end }}
{{ partial "mathjax.html" . }}
{{- partial "analytics.html" . }}
{{- if templates.Exists "partials/extra-foot.html" -}}

View file

@ -1,7 +1,7 @@
name = "Hermit-V2"
license = "MIT"
licenselink = "https://github.com/1bl4z3r/hermit-V2/blob/main/LICENSE"
description = "A minimal and fast hugo theme for bloggers."
description = "Continuing Hermit's legacy to be minimal and fast theme"
homepage = "https://github.com/1bl4z3r/hermit-V2"
demosite = "https://1bl4z3r.github.io/hermit-V2/"
tags = ["blog", "minimal", "dark", "responsive", "fast"]