1bl4z3r / hermit-V2

Continuing Hermit's legacy to be minimal and fast theme
https://1bl4z3r.github.io/hermit-V2/
MIT License
91 stars 38 forks source link

Request: ability to disable "Made with Hugo" in `footer.html` #28

Closed jamesbraza closed 12 months ago

jamesbraza commented 12 months ago

When migrating from Hermit to Hermit-V2, looking at footer.html, it seems there is a change where it add "Made with Hugo" and "Theme Hermit-V2":

image

Any chance you'd be willing to add a config flag to disable those additions? I prefer to have a smaller footer.


Trying to copy layouts/partials/footer.html into my own project dir, and modify it myself for now, I get the below error when running hugo server -D:

Error: error building site: TOCSS: failed to transform "css/style.css" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information

So maybe if you don't want to add new config flags, how can I override the layouts/partials/footer.html myself?

1bl4z3r commented 12 months ago

Hi @jamesbraza,

I am sorry that you had to face this hiccup.

Your issue is two fold and I will try to answer both of them.

  1. Copying from https://gohugo.io/templates/partials/

Partial templates— like single page templates and list page templates—have a specific lookup order. However, partials are simpler in that Hugo will only check in two places:

  • layouts/partials/*.html
  • themes//layouts/partials/*.html This allows a theme’s end user to copy a partial’s contents into a file of the same name for further customization.

Hence, you can (theoretically) copy footer.html from theme folder and pop it in layouts/partials and do edits there (and also send out a PR while you are at it)

  1. However, the error output suggests you should used hugo-extended version. hugo-extended has proper support for SASS compilation.

I am keeping this issue open incase I need to bring out my tin-foil hat

jamesbraza commented 12 months ago

Oh moving to hugo_extended_0.119.0_darwin-universal indeed solved TOCSS: failed to transform "css/style.css" (text/x-scss). awesome! I can now successfully override footer.html.

I see that was documented in the "original README" section here: https://github.com/1bl4z3r/hermit-V2/blob/main/README.md#customize-css

Fwiw, there's a way to configure the theme to alert that "extended" is required: https://gohugo.io/hugo-modules/configuration/#module-configuration-hugoversion (using extended = true):

# theme.toml

[module]
[module.hugoVersion]
min = "1.2.3"
extended = true

It would be good to add that to this theme.toml, if you're open to it 😄

1bl4z3r commented 12 months ago

That would be very logical, yes. I will update it by today.

I assumed that everyone is using extended. My bad.

1bl4z3r commented 12 months ago

Added extended = true to theme.toml Closing this issue.