I just stumbled across Hugo, a static generator written in Go. I’m using Jekyll now and recently kicked the tires on Harp. I mostly like Jekyll but am wishing for a better templating engine than liquid, and I’d prefer Go over Ruby if all else were equal.

  • Briefly tried to run Hugo against the Jekyll repo, decided it’s a bad idea
  • Apparently TOML is the cool, hip new text file format. Hugo can use YAML or JSON config, too
  • hugo import jekyll ..\jekyll\midnightfreddie.com midnightfreddie.com
    • It kept erroring out on YAML front matter like title: ! 'title: with colon', so I had to delete all the !s. I guess it was an artifact of colons in titles from the Wordpress-to-Jekyll conversion.
  • I was wondering about the theme; the Hugo Jekyll importer prompts me to install one:

      Congratulations! 126 post(s) imported!
      Now, start Hugo by yourself:
      $ git clone https://github.com/spf13/herring-cove.git midnightfreddie.com/themes/herring-cove
      $ cd midnightfreddie.com
      $ hugo server --theme=herring-cove
    
  • For grins, ran hugo server without getting a theme, and there is nothing in the themes folder
    • The root page is blank
    • Hugo is serving pages from memory; there is no public folder or output files
    • So I’m not sure what the URLs would be
    • Recall seeing index.xml created when I built and empty skeleton site, so tried that and voila, there are my page links. Also sitemap.xml is populated.
    • The links are 404s, though. Guess I’ll get that theme installed now
  • Cloned the theme, tried again, still blank. Realized I didn’t run the right command
  • hugo server --theme=herring-cove works
    • my long title looks awful in this theme
    • The language-specific liquid highlighting tags don’t work, but that should be expected
    • Actually, I kind of hate this theme almost in its entirety. will try some others
  • Themes
  • I need to figure out how to change permalinks
  • To note: it didn’t import my draft posts
  • Also to note: It didn’t link my pages
    • It skipped my pages altogether?
  • Also: it made category and tag index pages, and I currently don’t want that…or do I?
  • Tip: hugo config shows the site settings including ones I didn’t see on the doc page
    • rssuri I can change to feed.xml to keep the same uri
    • uglyurls = true doesn’t work, at least for the dev server and the casper theme
    • Oh there are pagination controls
  • Oh, does this mean if I remove the list layout I won’t get index pages generated? If so that seems it might be the only way to avoid these.

    When taxonomies are used (and templates are provided), Hugo will automatically create pages listing all of the taxonomies, their terms and all of the content attached to those terms.

  • Other docs to check out