# tips & tricks

**URL:** https://discourse.gohugo.io/c/tips-tricks/38.md

[Latest](https://discourse.gohugo.io/latest.md) · [Categories](https://discourse.gohugo.io/categories.md) · [Tags](https://discourse.gohugo.io/tags.md)

---

## [About the tips & tricks category](https://discourse.gohugo.io/t/about-the-tips-tricks-category/40)

<div class="topic-metadata">

**Author:** [@natefinch](https://discourse.gohugo.io/u/natefinch)\
**Replies:** 0\
**Last updated:** [September 18, 2014, 1:26pm UTC](https://discourse.gohugo.io/t/about-the-tips-tricks-category/40 "2014-09-18T13:26:36Z")

</div>

Give back to the community. Post template snippets, debugging tips, and layout ideas here.

---

## [Quick Tip for Symbolic Links](https://discourse.gohugo.io/t/quick-tip-for-symbolic-links/14185)

<div class="topic-metadata">

**Author:** [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Replies:** 1\
**Last updated:** [November 9, 2026, 8:27pm UTC](https://discourse.gohugo.io/t/quick-tip-for-symbolic-links/14185 "2026-11-09T20:27:52Z")

</div>

Ok… Assuming you have a created a local symlink under /assets/ that points to an img directory under /static/img because you need to process images on the fly with .resources.Get You will discover that while everything…

---

## [Migrating templates to the new template system (v0.146.0 and later)](https://discourse.gohugo.io/t/migrating-templates-to-the-new-template-system-v0-146-0-and-later/57770)

<div class="topic-metadata">

**Author:** [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Replies:** 0\
**Last updated:** [November 6, 2026, 12:53am UTC](https://discourse.gohugo.io/t/migrating-templates-to-the-new-template-system-v0-146-0-and-later/57770 "2026-11-06T00:53:46Z")

</div>

When Hugo v0.146.0 introduced the new template system, we added a one-page summary of the changes to the documentation while we worked on a full update. That update is done, and the documentation now describes how templa…

---

## [Defining and validating reusable arguments in Hugo](https://discourse.gohugo.io/t/defining-and-validating-reusable-arguments-in-hugo/57651)

<div class="topic-metadata">

**Author:** [@markdumay](https://discourse.gohugo.io/u/markdumay)\
**Replies:** 4\
**Last updated:** [October 12, 2026, 12:33pm UTC](https://discourse.gohugo.io/t/defining-and-validating-reusable-arguments-in-hugo/57651 "2026-10-12T12:33:09Z")

</div>

Hinode is a Hugo theme in which most shortcodes wrap a partial that handles the actual rendering. This lets the same component be used from Markdown content and from layout templates, but it also means the component’s ar…

---

## [Hugo Tutorials & Tips](https://discourse.gohugo.io/t/hugo-tutorials-tips/39009)

<div class="topic-metadata">

**Author:** [@tut](https://discourse.gohugo.io/u/tut)\
**Replies:** 7\
**Last updated:** [October 10, 2026, 1:11pm UTC](https://discourse.gohugo.io/t/hugo-tutorials-tips/39009 "2026-10-10T13:11:52Z")

</div>

This wiki contains some tutorials and tips that might help beginners and others alike with Hugo. See Recommended Reading Reference for other tips. No. Title Description Link 1 Use of Content Adapters Know about …

---

## [The Road to Dart Sass 2 (Sass site blog post)](https://discourse.gohugo.io/t/the-road-to-dart-sass-2-sass-site-blog-post/57578)

<div class="topic-metadata">

**Author:** [@bwintx](https://discourse.gohugo.io/u/bwintx)\
**Replies:** 0\
**Last updated:** [September 23, 2026, 4:00pm UTC](https://discourse.gohugo.io/t/the-road-to-dart-sass-2-sass-site-blog-post/57578 "2026-09-23T16:00:32Z")

</div>

For those using Dart Sass with your sites, this may be worth keeping an eye on for the next few months:

---

## [Set tab size on GitHub](https://discourse.gohugo.io/t/set-tab-size-on-github/57563)

<div class="topic-metadata">

**Author:** [@bep](https://discourse.gohugo.io/u/bep)\
**Replies:** 0\
**Last updated:** [September 18, 2026, 1:45pm UTC](https://discourse.gohugo.io/t/set-tab-size-on-github/57563 "2026-09-18T13:45:37Z")

</div>

This is especially relevant of you format your templates with gotmplfmt and the default tab size 4 give a little too much indendation when viewed on GitHub:

---

## [Locate the template source for a deprecation warning](https://discourse.gohugo.io/t/locate-the-template-source-for-a-deprecation-warning/57543)

<div class="topic-metadata">

**Author:** [@bep](https://discourse.gohugo.io/u/bep)\
**Replies:** 2\
**Last updated:** [September 17, 2026, 11:03am UTC](https://discourse.gohugo.io/t/locate-the-template-source-for-a-deprecation-warning/57543 "2026-09-17T11:03:58Z")

</div>

Run: hugo --panicOnWarning

---

## [Impressed returning to Hugo!](https://discourse.gohugo.io/t/impressed-returning-to-hugo/57522)

<div class="topic-metadata">

**Author:** [@jb2170](https://discourse.gohugo.io/u/jb2170)\
**Replies:** 3\
**Last updated:** [September 15, 2026, 9:37pm UTC](https://discourse.gohugo.io/t/impressed-returning-to-hugo/57522 "2026-09-15T21:37:36Z")

</div>

Hi all! I used Hugo from early 2021 to early 2023, with only occasional maintenance commits from 2024 forwards (no Hugo layouts programming). I’ve returned to Hugo this past month after writing a standalone single-page …

---

## [Migrating Hugo from Netlify to Cloudflare Workers (Handling Contact Forms, D1, Turnstile & Analytics)](https://discourse.gohugo.io/t/migrating-hugo-from-netlify-to-cloudflare-workers-handling-contact-forms-d1-turnstile-analytics/57547)

<div class="topic-metadata">

**Author:** [@idarek](https://discourse.gohugo.io/u/idarek)\
**Replies:** 0\
**Last updated:** [September 13, 2026, 8:34am UTC](https://discourse.gohugo.io/t/migrating-hugo-from-netlify-to-cloudflare-workers-handling-contact-forms-d1-turnstile-analytics/57547 "2026-09-13T08:34:53Z")

</div>

Hi all, I want to share my recent experience migrating my static Hugo website away from Netlify over to Cloudflare Workers. While Netlify served me well for a long time, the restrictive free-tier limits – particularly …

---

## [Automatic Syntax Highlighting for Hugo templates](https://discourse.gohugo.io/t/automatic-syntax-highlighting-for-hugo-templates/57541)

<div class="topic-metadata">

**Author:** [@irkode](https://discourse.gohugo.io/u/irkode)\
**Replies:** 0\
**Last updated:** [September 10, 2026, 5:43pm UTC](https://discourse.gohugo.io/t/automatic-syntax-highlighting-for-hugo-templates/57541 "2026-09-10T17:43:39Z")

</div>

A while ago automatic syntax highlighting has been added to our forum. That means, it is not necessary anymore to set a fenced code block in the forum to a less breaking language aka ruby php or assigning text. (unless…

---

## [Framed, dual-theme code blocks for any Hugo site, applied post-build (no theme changes)](https://discourse.gohugo.io/t/framed-dual-theme-code-blocks-for-any-hugo-site-applied-post-build-no-theme-changes/57447)

<div class="topic-metadata">

**Author:** [@frostybee](https://discourse.gohugo.io/u/frostybee)\
**Replies:** 2\
**Last updated:** [August 6, 2026, 5:35pm UTC](https://discourse.gohugo.io/t/framed-dual-theme-code-blocks-for-any-hugo-site-applied-post-build-no-theme-changes/57447 "2026-08-06T17:35:00Z")

</div>

Hi all, I built a tool I’d like to share, since it addresses a few things that come up here regularly: different syntax highlighting for dark and light mode, theme CSS bleeding into code blocks, and hand-rolling copy-to…

---

## [Need advices for a daily usage post creation](https://discourse.gohugo.io/t/need-advices-for-a-daily-usage-post-creation/57406)

<div class="topic-metadata">

**Author:** [@pled1](https://discourse.gohugo.io/u/pled1)\
**Replies:** 9\
**Last updated:** [July 29, 2026, 8:13am UTC](https://discourse.gohugo.io/t/need-advices-for-a-daily-usage-post-creation/57406 "2026-07-29T08:13:16Z")

</div>

Hi, I am about to migrate from WP to Hugo, and I would need some advices from experienced users about the “daily usage” when using Hugo. Here is where I am : I have installed Hugo locally on my desktop (running Endeavo…

---

## [Updated hosting guides](https://discourse.gohugo.io/t/updated-hosting-guides/57298)

<div class="topic-metadata">

**Author:** [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Replies:** 2\
**Last updated:** [July 27, 2026, 2:51pm UTC](https://discourse.gohugo.io/t/updated-hosting-guides/57298 "2026-07-27T14:51:52Z")

</div>

We have significantly updated the following hosting guides: AWS Amplify Azure Static Web Apps Cloudflare Codeberg Pages Firebase GitHub Pages GitLab Pages Render Vercel With these new instructions, build caching is no…

---

## [Tutorial: Make a Hugo blog from scratch](https://discourse.gohugo.io/t/tutorial-make-a-hugo-blog-from-scratch/16375)

<div class="topic-metadata">

**Author:** [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Replies:** 27\
**Last updated:** [July 26, 2026, 5:40pm UTC](https://discourse.gohugo.io/t/tutorial-make-a-hugo-blog-from-scratch/16375 "2026-07-26T17:40:24Z")

</div>

Copied from the tutorial intro: In my opinion, Hugo’s current quick start is ample. It does just what the name says, gets you started you quickly . Still, there have many requests on the forums for a tutorial that di…

---

## [Hosting a Hugo site on a Cloudflare Worker](https://discourse.gohugo.io/t/hosting-a-hugo-site-on-a-cloudflare-worker/55203)

<div class="topic-metadata">

**Author:** [@tyco](https://discourse.gohugo.io/u/tyco)\
**Replies:** 25\
**Last updated:** [June 19, 2026, 11:59pm UTC](https://discourse.gohugo.io/t/hosting-a-hugo-site-on-a-cloudflare-worker/55203 "2026-06-19T23:59:08Z")

</div>

Following a discussion on hosting Hugo on a Cloudflare worker, @jmooring came up with an excellent solution. Here’s an example project hosted on a Cloudflare Worker: This is the build script: And the wrangler.toml…

---

## [Bash script checker to prevent drafts from being published accidentally](https://discourse.gohugo.io/t/bash-script-checker-to-prevent-drafts-from-being-published-accidentally/57238)

<div class="topic-metadata">

**Author:** [@ES7313](https://discourse.gohugo.io/u/ES7313)\
**Replies:** 2\
**Last updated:** [June 9, 2026, 3:08am UTC](https://discourse.gohugo.io/t/bash-script-checker-to-prevent-drafts-from-being-published-accidentally/57238 "2026-06-09T03:08:01Z")

</div>

I accidentally removed draft = true line in the front matter which caused the unfinished post being built and deployed live. I couldn’t find a way to stop Hugo from publishing content that doesn’t have a draft parameter,…

---

## [My shortcodes and others articles (EN, FR)](https://discourse.gohugo.io/t/my-shortcodes-and-others-articles-en-fr/22212)

<div class="topic-metadata">

**Author:** [@hucste](https://discourse.gohugo.io/u/hucste)\
**Replies:** 15\
**Last updated:** [May 15, 2026, 11:40pm UTC](https://discourse.gohugo.io/t/my-shortcodes-and-others-articles-en-fr/22212 "2026-05-15T23:40:48Z")

</div>

Hi, all I wrote an article to promote some shortcodes, by me, to use with Hugo. The shortcodes are for: element HTML abbr an anchor in same page citation with element HTML blockquote a bloc of code a color of text di…

---

## [Counterscale - New Analytics Service that Hugo sites can use](https://discourse.gohugo.io/t/counterscale-new-analytics-service-that-hugo-sites-can-use/52823)

<div class="topic-metadata">

**Author:** [@stoic](https://discourse.gohugo.io/u/stoic)\
**Replies:** 16\
**Last updated:** [May 14, 2026, 10:49am UTC](https://discourse.gohugo.io/t/counterscale-new-analytics-service-that-hugo-sites-can-use/52823 "2026-05-14T10:49:29Z")

</div>

Counterscale is a simple web analytics tracker and dashboard that you self-host on Cloudflare. It’s designed to be easy to deploy and maintain, and should cost you near-zero to operate – even at high levels of traffic (…

---

## [Advanced markdown table layout renderer](https://discourse.gohugo.io/t/advanced-markdown-table-layout-renderer/56829)

<div class="topic-metadata">

**Author:** [@djibe](https://discourse.gohugo.io/u/djibe)\
**Replies:** 5\
**Last updated:** [May 4, 2026, 5:53pm UTC](https://discourse.gohugo.io/t/advanced-markdown-table-layout-renderer/56829 "2026-05-04T17:53:27Z")

</div>

Hi, inspired by awesome @jmooring , here is an advanced \`render-table.html\` with the following features for advanced markdown tables, with a single line of parameters under the table Features Default markdown tables (h…

---

## [Markdown linter for Hugo content — fast, no Node.js, link validation built in](https://discourse.gohugo.io/t/markdown-linter-for-hugo-content-fast-no-node-js-link-validation-built-in/57034)

<div class="topic-metadata">

**Author:** [@kazutomo.deguchi](https://discourse.gohugo.io/u/kazutomo.deguchi)\
**Replies:** 0\
**Last updated:** [April 21, 2026, 2:42pm UTC](https://discourse.gohugo.io/t/markdown-linter-for-hugo-content-fast-no-node-js-link-validation-built-in/57034 "2026-04-21T14:42:38Z")

</div>

I built a Markdown linter called gomarklint and wanted to share it here since Hugo is one of the main use cases I had in mind. The short version: single binary, no Node.js required, and it’s fast — 100,000+ lines in ~17…

---

## [How to make a customizable comment system with Firebase](https://discourse.gohugo.io/t/how-to-make-a-customizable-comment-system-with-firebase/57023)

<div class="topic-metadata">

**Author:** [@benayu](https://discourse.gohugo.io/u/benayu)\
**Replies:** 2\
**Last updated:** [April 19, 2026, 2:50pm UTC](https://discourse.gohugo.io/t/how-to-make-a-customizable-comment-system-with-firebase/57023 "2026-04-19T14:50:29Z")

</div>

If you can’t find a suitable comment system for your blog, I’ve written a small tutorial on how to create your own comment system hosted on Firebase. It’s very customizable and has XSS filters. However, there’s no modera…

---

## [RE. Hugo search tools - Lunrjs appears abandoned](https://discourse.gohugo.io/t/re-hugo-search-tools-lunrjs-appears-abandoned/57022)

<div class="topic-metadata">

**Author:** [@bandulu](https://discourse.gohugo.io/u/bandulu)\
**Replies:** 1\
**Last updated:** [April 18, 2026, 2:02pm UTC](https://discourse.gohugo.io/t/re-hugo-search-tools-lunrjs-appears-abandoned/57022 "2026-04-18T14:02:52Z")

</div>

Some of the Search tools in the docs mention lunrjs, which hasn’t had any action in 6 years GitHub - olivernn/lunr.js: A bit like Solr, but much smaller and not as bright · GitHub. Recommended alternatives: https://gi…

---

## [\[Howto\] auto deploy a hugo site on gandi simple hosting](https://discourse.gohugo.io/t/howto-auto-deploy-a-hugo-site-on-gandi-simple-hosting/2790)

<div class="topic-metadata">

**Author:** [@Bunker](https://discourse.gohugo.io/u/Bunker)\
**Replies:** 3\
**Last updated:** [April 14, 2026, 6:11pm UTC](https://discourse.gohugo.io/t/howto-auto-deploy-a-hugo-site-on-gandi-simple-hosting/2790 "2026-04-14T18:11:17Z")

</div>

I'm not going to post the whole article I wrote on my website about it here, but if you are interested, I documented the way that I automatically deploy Hugo to Gandi simple hosting. Situation: Hugo code on github H…

---

## [Hidden/headless section using content adapters](https://discourse.gohugo.io/t/hidden-headless-section-using-content-adapters/56994)

<div class="topic-metadata">

**Author:** [@NormPlum](https://discourse.gohugo.io/u/NormPlum)\
**Replies:** 0\
**Last updated:** [April 14, 2026, 5:06am UTC](https://discourse.gohugo.io/t/hidden-headless-section-using-content-adapters/56994 "2026-04-14T05:06:51Z")

</div>

To create hidden (or headless) pages (i.e. pages that cannot be accessed on their own, but whose content can be included on other pages), you can use Build Options. The documentation explains how to do this using front …

---

## [Hugo Module for llms.txt and llms-full.txt](https://discourse.gohugo.io/t/hugo-module-for-llms-txt-and-llms-full-txt/56990)

<div class="topic-metadata">

**Author:** [@Md\_Farhad\_Hossen](https://discourse.gohugo.io/u/Md_Farhad_Hossen)\
**Replies:** 0\
**Last updated:** [April 13, 2026, 4:04am UTC](https://discourse.gohugo.io/t/hugo-module-for-llms-txt-and-llms-full-txt/56990 "2026-04-13T04:04:28Z")

</div>

Hi everyone, With the rise of AI agents and LLMs browsing the web, providing a machine-readable version of your site’s content is becoming increasingly useful. To make this easier for the Hugo community, we’ve created a…

---

## [Deprecations in v0.156.0](https://discourse.gohugo.io/t/deprecations-in-v0-156-0/56732)

<div class="topic-metadata">

**Author:** [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Replies:** 13\
**Last updated:** [April 10, 2026, 7:27pm UTC](https://discourse.gohugo.io/t/deprecations-in-v0-156-0/56732 "2026-04-10T19:27:15Z")

</div>

Background Historically, we used the terms site and project interchangeably. With monolingual projects, that was essentially correct. With multilingual projects, it was not correct, in that every language is internally r…

---

## [Custom footnote shortcode](https://discourse.gohugo.io/t/custom-footnote-shortcode/56892)

<div class="topic-metadata">

**Author:** [@dayglo](https://discourse.gohugo.io/u/dayglo)\
**Replies:** 3\
**Last updated:** [March 28, 2026, 1:10am UTC](https://discourse.gohugo.io/t/custom-footnote-shortcode/56892 "2026-03-28T01:10:59Z")

</div>

Hey everybody, I’ve been writing a few blog posts on my personal blog lately that have required me to link to references and I found the existing markdown syntax for footnotes a bit wanting so I rolled my own. Here’s th…

---

## [Deprecations in v0.158.0](https://discourse.gohugo.io/t/deprecations-in-v0-158-0/56869)

<div class="topic-metadata">

**Author:** [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Replies:** 0\
**Last updated:** [March 16, 2026, 6:35pm UTC](https://discourse.gohugo.io/t/deprecations-in-v0-158-0/56869 "2026-03-16T18:35:50Z")

</div>

Background In v0.158.0 we renamed some language-related template methods and their corresponding project configuration settings. Although there were several reasons for doing so, the primary reason was to eliminate API s…

---

## [Convert my Hugo theme sass styles to vanilla css with nesting and layers](https://discourse.gohugo.io/t/convert-my-hugo-theme-sass-styles-to-vanilla-css-with-nesting-and-layers/56827)

<div class="topic-metadata">

**Author:** [@frjo](https://discourse.gohugo.io/u/frjo)\
**Replies:** 1\
**Last updated:** [March 8, 2026, 10:08pm UTC](https://discourse.gohugo.io/t/convert-my-hugo-theme-sass-styles-to-vanilla-css-with-nesting-and-layers/56827 "2026-03-08T22:08:19Z")

</div>

With Hugo depreciating the old libsass I needed to convert my theme to either dartsass or vanilla css. I opted for modern vanilla css with nesting and layers. Converting from sass to css nesting was some work but here I…

[Next page](https://discourse.gohugo.io/c/tips-tricks/38.md?page=1)
