Update nixpkgs -> update hugo to 0.152.2

That also requires a couple of changes in the template. For some of them I just remove the corresponding feature like analytics and comments.
This commit is contained in:
Vojtěch Káně
2026-02-22 21:08:59 +01:00
parent 5b437caa4e
commit dd5da12b96
17 changed files with 21 additions and 46 deletions

View File

@@ -4,10 +4,6 @@
"title": "Vojtěch Káně", "title": "Vojtěch Káně",
"theme": "hermit", "theme": "hermit",
"author": {
"name": "Vojtěch Káně"
},
"markup": { "markup": {
"goldmark": { "goldmark": {
"renderer": { "renderer": {
@@ -38,7 +34,10 @@
"name": "email", "name": "email",
"url": "mailto:vojtech@vkane.cz" "url": "mailto:vojtech@vkane.cz"
} }
] ],
"author": {
"name": "Vojtěch Káně"
}
}, },
"enableRobotsTXT": true "enableRobotsTXT": true

View File

@@ -3,10 +3,10 @@ menu: main
title: Blogroll title: Blogroll
weight: 5 weight: 5
outputs: [ "HTML" ] outputs: [ "HTML" ]
_build: build:
render: true render: true
cascade: cascade:
_build: build:
render: false render: false
list: true list: true
--- ---

View File

@@ -3,10 +3,10 @@ menu: main
title: Donating challenge title: Donating challenge
weight: 4 weight: 4
outputs: [ "HTML" ] outputs: [ "HTML" ]
_build: build:
render: true render: true
cascade: cascade:
_build: build:
render: false render: false
list: true list: true
--- ---

View File

@@ -3,10 +3,10 @@ menu: main
title: My work title: My work
weight: 3 weight: 3
outputs: [ "HTML" ] outputs: [ "HTML" ]
_build: build:
render: true render: true
cascade: cascade:
_build: build:
render: false render: false
list: true list: true
--- ---

6
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1662096612, "lastModified": 1769598131,
"narHash": "sha256-R+Q8l5JuyJryRPdiIaYpO5O3A55rT+/pItBrKcy7LM4=", "narHash": "sha256-e7VO/kGLgRMbWtpBqdWl0uFg8Y2XWFMdz0uUJvlML8o=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "21de2b973f9fee595a7a1ac4693efff791245c34", "rev": "fa83fd837f3098e3e678e6cf017b2b36102c7211",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -87,12 +87,6 @@ In Hugo, layouts can live in either the projects (root) or the themes layo
##### Customize social icons ##### Customize social icons
You can modify or add any svg icons in site's `layouts/partials/svg.html`. You can modify or add any svg icons in site's `layouts/partials/svg.html`.
##### Customize comment system
We only have built-in support for Disqus at the moment, if that doesn't fit your needs, you can just add html to site's `layouts/partials/comments.html`.
##### Add custom analytics
If you prefer to use different analytics system other than google analytics, then add them inside `layouts/partials/analytics.html`.
#### Customize CSS #### Customize CSS
If you'd like to customize theme color or fonts, you can simply override `assets/scss/_predefined.scss`, by simply copy it to site's root (keep the same relative path) then edit those variables. But keep in mind, you'll need **Hugo extended version** which has the ability to rebuild SCSS. You don't have to use extended version in production but in this case it's necessary to make sure the `resources` folder is committed and "up to date" (by running `hugo` or `hugo server` locally using the extended version). But anyway, always use the extended version if you can. If you'd like to customize theme color or fonts, you can simply override `assets/scss/_predefined.scss`, by simply copy it to site's root (keep the same relative path) then edit those variables. But keep in mind, you'll need **Hugo extended version** which has the ability to rebuild SCSS. You don't have to use extended version in production but in this case it's necessary to make sure the `resources` folder is committed and "up to date" (by running `hugo` or `hugo server` locally using the extended version). But anyway, always use the extended version if you can.

View File

@@ -2,7 +2,6 @@
title: "{{ replace .Name "-" " " | title }}" title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }} date: {{ .Date }}
draft: true draft: true
comments: false
images: images:
--- ---

View File

@@ -10,8 +10,6 @@ pygmentsUseClasses = true
rssLimit = 10 # Maximum number of items in the RSS feed. rssLimit = 10 # Maximum number of items in the RSS feed.
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." # This message is only used by the RSS template. copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." # This message is only used by the RSS template.
enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/functions/emojify/ enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/functions/emojify/
# googleAnalytics = "UA-123-45"
# disqusShortname = "yourdiscussshortname"
[author] [author]
name = "John Doe" name = "John Doe"

View File

@@ -41,7 +41,6 @@
<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script> <script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
{{ end }} {{ end }}
{{- partial "analytics.html" . }}
{{- if templates.Exists "partials/extra-foot.html" -}} {{- if templates.Exists "partials/extra-foot.html" -}}
{{ partial "extra-foot.html" . }} {{ partial "extra-foot.html" . }}
{{- end }} {{- end }}

View File

@@ -21,11 +21,6 @@
<div class="content"> <div class="content">
{{ .Content | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" `${1}<a href="#${2}" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a>${3}` | safeHTML }} {{ .Content | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" `${1}<a href="#${2}" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a>${3}` | safeHTML }}
</div> </div>
{{- if .Params.comments }}
<div id="comments" class="thin">
{{ partial "comments.html" . }}
</div>
{{- end }}
</main> </main>
{{ end }} {{ end }}

View File

@@ -29,8 +29,8 @@
</div> </div>
<div id="home-footer"> <div id="home-footer">
<p> <p>
&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }} &copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Params.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }} &#183; <a href="{{ "posts/index.xml" | absLangURL }}" target="_blank" title="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></a>{{ end }} &#183; <a href="{{ "posts/index.xml" | absLangURL }}" target="_blank" title="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></a>
</p> </p>
</div> </div>
</div> </div>

View File

@@ -1 +0,0 @@
{{ template "_internal/google_analytics_async.html" . }}

View File

@@ -1,3 +0,0 @@
{{- if .Site.DisqusShortname }}
{{ template "_internal/disqus.html" . }}
{{- end }}

View File

@@ -1,7 +1,7 @@
<footer id="site-footer" class="section-inner thin animated fadeIn faster"> <footer id="site-footer" class="section-inner thin animated fadeIn faster">
<p>&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}</p> <p>&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Params.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}</p>
<p> <p>
Made with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> &#183; Theme <a href="https://github.com/Track3/hermit" target="_blank" rel="noopener">Hermit</a> Made with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> &#183; Theme <a href="https://github.com/Track3/hermit" target="_blank" rel="noopener">Hermit</a>
{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }} &#183; <a href="{{ "posts/index.xml" | absLangURL }}" target="_blank" title="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></a>{{ end }} &#183; <a href="{{ "posts/index.xml" | absLangURL }}" target="_blank" title="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></a>
</p> </p>
</footer> </footer>

View File

@@ -4,9 +4,9 @@
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} <managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" -}} {{ with .OutputFormats.Get "RSS" -}}
@@ -17,7 +17,7 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description> <description>{{ .Summary | html }}</description>
<content type="html">{{ printf `<![CDATA[%s]]>` .Content | safeHTML }}</content> <content type="html">{{ printf `<![CDATA[%s]]>` .Content | safeHTML }}</content>

View File

@@ -66,9 +66,6 @@
</a> </a>
{{- end }} {{- end }}
</div> </div>
<div id="comments" class="thin">
{{- partial "comments.html" . -}}
</div>
</main> </main>
{{ end }} {{ end }}

View File

@@ -8,8 +8,6 @@ features = [
"single column", "single column",
"featured image", "featured image",
"social icons", "social icons",
"google analytics",
"disqus"
] ]
min_version = 0.43 min_version = 0.43