Questions tagged [hugo]

Hugo is a very fast static site generator written in Go. Please refer to https://gohugo.io/documentation/ or https://discourse.gohugo.io/ before posting questions here.

Hugo is a fast static website engine. It’s written in (aka Golang) and developed by bep, spf13 and friends.

From What is Hugo:

Hugo is a general-purpose website framework. Technically speaking, Hugo is a static site generator. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website’s end users and an ideal writing experience for website authors.

Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted anywhere, including Netlify, Heroku, GoDaddy, DreamHost, GitHub Pages, GitLab Pages, Surge, Aerobatic, Firebase, Google Cloud Storage, Amazon S3, Rackspace, Azure, and CloudFront and work well with CDNs. Hugo sites run without the need for a database or dependencies on expensive runtimes like Ruby, Python, or PHP.

Hugo offers native support for content written in , and metadata (front matter) in TOML, YAML or JSON.

References:

1284 questions
70
votes
5 answers

Where do I put my favicon with Hugo

I am using Hugo to generate a static site. Where should I put my favicon.ico file?
katzkode
  • 1,911
  • 1
  • 13
  • 18
43
votes
5 answers

How to add a new hugo static page?

From the "getting started" section it seems this should work, but it doesn't. hugo new site my-site hugo new privacy.md hugo server --watch --includeDrafts curl -L localhost:1313/privacy/index.html # 404 page not found curl -L…
AJcodez
  • 31,780
  • 20
  • 84
  • 118
38
votes
5 answers

Trying to install Hugo via Homebrew - "Could Not Resolve HEAD to a Revision"

I'm trying to take a stab at a new site using Hugo, and I am stuck during installation. I've installed Homebrew and when running the version, I get the following: ~ % brew --version Homebrew 2.7.2 Homebrew/homebrew-core (no git…
Sackadelic
  • 945
  • 1
  • 11
  • 21
38
votes
19 answers

"Page Not Found" when trying to access a site deployed on Netlify

I'm running a static blogdown site and deploy it on Netlify. I source files on GitHub, Hugo builds the site, and Netlify deploys it. Netlify reports that the site is live (deploy log enclosed at the bottom), but when I'm trying to view my site, all…
Taraas
  • 1,268
  • 1
  • 11
  • 20
33
votes
3 answers

ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded

Running into this issue when working with Hugo and the AWS CLI on Ubuntu 18.04. ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (failed to map segment from shared object): ignored. This is a fresh install of Ubuntu…
CommandZ
  • 3,333
  • 1
  • 23
  • 28
32
votes
2 answers

Hugo shortcode ignored saying "raw HTML omitted"

I have written a shortcode to create a bootstrap dismissable alert box. Below is my shortcode called as layouts/shortcodes/message.html.
31
votes
5 answers

How to fix the error `found no layout file for "HTML" for "page"` in Hugo CMS?

I recently imported content from my WordPress page into Hugo. When I run hugo serve I get following error messages: WARN 2020/02/17 20:51:06 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts…
user6909438
30
votes
5 answers

Why is Hugo serving blank pages?

I am building a personal website using Hugo Static Page Generator, but when I do hugo serve, I am no longer seeing a page, but simply a blank page at localhost:1313. I deleted everything and did a fresh install. But still, Hugo is serving blank…
maximusdooku
  • 5,242
  • 10
  • 54
  • 94
28
votes
2 answers

How do I get my blogdown blog on R-Bloggers?

I generate my blog using blogdown, but when I have tried to submit it to R-Bloggers it is not accepted because my feed returns the following error: This XML document is invalid, likely due to invalid characters. XML error: Undeclared entity error…
nathaneastwood
  • 3,664
  • 24
  • 41
25
votes
2 answers

How to setup SCSS with Hugo

I'm pretty new with Hugo and am struggling a bit with the documentation as it feels pretty fragmented with incomplete examples. I've created a new site hugo new site site-name along with a new theme hugo new theme theme-name. In the documentation…
LostBalloon
  • 1,608
  • 3
  • 15
  • 31
23
votes
2 answers

Hugo with React?

Is it possible/ideal to use something like Hugo with React? I am aware of Gatsby, but would Hugo work as well. I have limited knowledge of combining the two but my understanding would be that Hugo would be used for all your templating and static web…
J. E
  • 413
  • 1
  • 6
  • 12
23
votes
4 answers

Linking pages in Hugo/markdown

I am new to HUGO (http://gohugo.io/) static site generator. I am running Hugo server locally accessible as localhost:1313. I am trying to link pages in two different sections. My "feature.md" file need a link to "grid_modules.md" and vice versa.…
Adeel
  • 343
  • 1
  • 2
  • 7
22
votes
3 answers

How to comment out content in Hugo

How do I comment out content in Hugo? If I have notes, unfinished thoughts, I'd like to leave them in the .md file but not have them appear in the html.