Skip to main content

Search

Items tagged with: Hugo


GitHub - panr/hugo-theme-terminal: A simple, retro theme for Hugo github.com/panr/hugo-theme-ter… #OpenSource #terminal #GitHub #retro #theme #hugo


Here’s the server that’s been running my two #fediverse instances and #Hugo blog for the past two years.

It’s a low-power Intel NUC with a Celeron processor, 16 GB of RAM, and a 500 GB SSD. The entire setup lives under my printer and cost less than $300.

Bandwidth demands are modest—just a few gigs weekly. No fancy tunneling involved either. It’s just a straightforward router setup forwarding a couple of ports, a script that updates the server’s IP with my registrar as needed, and a robust Fail2ban rule set to keep things a bit secure.

No more corporate social networks and VPSes!


Client-side comments with Mastodon on a static Hugo website

#Hugo #goHugo #Blog #Blogging #Comments #Mastodon #Fediverse

andreas.scherbaum.la/post/2024…


Hugo 0.126 supports pages from templates now.

I can finally have a real bookmarks section on my website auto-generated from my bookmarks manager! Right now it’s just a single page.

#Hugo #SSG
RE: fosstodon.org/@gohugoio/112445…

#hugo #ssg


I have the exact same story with Hugo. Dozens of regex filters, post-processing with xmllint and then sed-based regex filters…

Hugo’s massive parallelism leaves it completely unfit for proper post-processing. It’s next to impossible to configure any of Goldmark’s low-level markup choices beyond what render hooks support (I have to use regexes to customize backlinks, for instance).

On the other hand, regexes work pretty well with known trusted well-escaped input. #Hugo

#hugo


Reply to Shorter fingerprinting (Hugo issue 6241) by XhmikosR

I use a quick crypto.FNV32a-based fix for short cache-busting fingerprints that doesn’t directly rely on the unstable .Key method.
I use Hugo’s crypto.FNV32a to generate a short hash, then copy the resource to a new path with that fingerprint.

{{ $resource := resources.Get . -}}
{{- $target_path_formatStr := (replaceRE `(\.[^\.]*)$` ".%d$1" .) -}}
{{- $cacheBuster := $resource.Content | crypto.FNV32a -}}
{{- $target_path := printf $target_path_formatStr $cacheBuster -}}
{{- return resources.Copy $target_path $resource -}}
You can see it used in my site’s head element. I invoke it using partialCached so the fingerprinting only happens once per resource:
{{ $icon_svg := partialCached "cache-bust.html" "/favicon.svg" "/favicon.svg" }}
{{- printf `<link rel="icon" sizes="any" href="%s" type="image/svg+xml" />` $icon_svg.RelPermalink | safeHTML }}
Here’s a snippet of the final rendered result:
<span><a href="#cb1-1"></a><span><</span><span>link</span><span> rel</span><span>=</span><span>"icon"</span><span> sizes</span><span>=</span><span>"any"</span><span> href</span><span>=</span><span>"/favicon.2229316949.svg"</span><span> type</span><span>=</span><span>"image/svg+xml"</span><span>/></span></span>

Encoding it to a higher base and using alphanumerics could shave off 1-2 ch.

Originally posted on seirdy.one: See Original (POSSE). #Hugo

#hugo


#Hugo's slogan of being "The world’s fastest framework for building websites" is a shameless lie.

It has been raised up 3 times on Github with benchmarks showing that other full-featured static site generators like #Zola (#Rust) are faster, sometimes by 10x. Each time, the issue is closed and locked.

I migrated a couple of websites from Hugo to Zola and won't look back.

Feel free to ping me if you need any help with Zola 🥰

getzola.org/

#RustLang @kubikpixel


RT @nicfab@twitter.com

Cactus Comments: a solution respecting privacy for the websites built with Hugo | NicFab Notes | Our view on #Cactus #Comments based on #Matrix protocol, its integration with #Hugo, and respecting the #PbD correct approach - buff.ly/3qnorcZ @matrixdotorg@twitter.com @GoHugoIO@twitter.com

🐦🔗: twitter.com/nicfab/status/1475…