6

I just built a website with Hugo. And I love it. Got a request for a certain set of pages but because of the workflow the one thing I could dynamically load wasn't worth a whole wordpress site.

So I built it with Hugo instead. I played with it a little last week so I could get around but I got good this week and damn it's powerful.

I think I'm in love. I wish more projects at work could be built in Hugo.

Comments
  • 0
  • 0
    When I was looking into what to use, I even ditched Hugo as it's yet another part of the tech stack that I would have had to deal with.

    Instead, I abused GCC's preprocessor and made a build script.
  • 0
    Would you be willing to give someone like me who has no knowledge of what Hugo is a quick explanation of what it is and why you'd use it?

    I'm specifically interested cause I'm interested in Go on a potential language to learn
  • 1
    @BashouT Hugo is a static site generator it has templates, themes, and really simple content system. You also have shortcodes and asset management built in.

    I watched this series on 1.5x speed to learn the basics https://youtube.com/playlist/...
  • 1
    @ThatDannyBoy seems cool, and thanks for the videos I'll give em a peruse :)
  • 0
    @irene The key is to tell GCC to run the preprocessor only, not the compile stage.

    The article bodies are named as .c to fool the compiler and use includes to pull in doc header, page header, menu, and footer with some inlined JavaScript. The articles use defines to configure e.g. page title and canonical URL that get evaluated in the doc header include. Pages that are direct top nav items set up a define so that the menu template will blend in their nav element as greyed out.

    Then it's running GCC, spitting out all resulting files as HTML into a temp folder and running file compare against the existing version. Changed or new items are copied over, deleted ones are renamed as aaa_something.html. That way, I know what has changed and can preserve the time stamps.

    It's nice for folks familiar with the C preprocessor. Others have found that, too:

    https://zabkat.com/blog/...

    http://ithare.com/compiling-a-stati...
  • 0
    I started building a site with Hugo a few weeks ago, too. I like the possibilites the shortcodes offer. I really whish it would have an option to run external programs though, so I could add more custom preprocessing to it.

    @Fast-Nop: When all you have is a hammer…
  • 0
    @7400 a hammer, and a well defined ISO standard. I won't have to deal with "great" next versions that fix bugs, but introduce breaking changes just because someone got a bee in his bonnet. I won't have to find ways to work around a tool's preferences of doing things because my setup does exactly what I want. And I hate markdown.
  • 0
  • 1
    what's a good resource to learn?
  • 0
    @Fast-Nop: No problem with it, if it works for you.

    @ThatDannyBoy: I'm using those for SCSS already. But I don't see how they can be used with external programs?
  • 0
    @7400 I don't know about external programs. Basic concatenation and minification is built in for both css and js.

    Also Image progressing is pretty good. https://gohugo.io/content-managemen...
Add Comment