{
  "$type": "site.standard.document",
  "description": "feat: notes from Hugo installation and config",
  "path": "/posts/hugo-install-notes/",
  "publishedAt": "2024-07-15T00:00:00.000Z",
  "site": "https://read.ryancowl.es",
  "tags": [
    "Code"
  ],
  "textContent": "These are just a few gotchas I ran into while setting up Hugo for the first time. Nothing major, but each one cost me some time. Maybe I can save a little of yours :)\n\n  \n\nJSON or TOML?\n\nI originally created a JSON config file (), which is officially supported by Hugo. However, the build failed on DigitalOcean. I used TOML instead () and that resolved the issue. The site builds locally without issue using either format, but something breaks in the build process.\n\nRelated: Hugo defaults to  as the config filename, but DigitalOcean's buildpack expects . If your builds are failing for no obvious reason, check the filename.\n\n  \n\nHugo Module or Git Submodule?\n\nAt first, I added my theme to my local site as a Hugo Module. However, when the site was deployed to DigitalOcean, it errored out on build. From what I can tell in the logs, the build process on DigitalOcean saw  and  and tried building as a vanilla Go app. I switched to a Git submodule instead, which worked without issue:\n\n  \n\nDraft Content Doesn't Build by Default\n\nIf you create a new page or post and it doesn't show up, check your frontmatter. Hugo sets  by default on new content. To preview drafts locally, run  (the  flag is short for ). Drafts won't be included in production builds, so make sure to set  before you deploy.\n\n  \n\nAllow Inline HTML\n\nBy default, Hugo's Goldmark renderer strips raw HTML from your markdown. If you need inline HTML (for things like  tags or embedded content), add this to your config:\nI'll add to this list if I run into anything else. Hugo is fun to work with once you get past the initial setup quirks.",
  "title": "Hugo Install Notes"
}