Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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. -
BashouT5746yWould 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 -
@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/... -
@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... -
@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.
-
740027566y@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? -
@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...
Related Rants
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.
rant
static website
hugo