3 ms·
Love Hugo. Been using Hugo for quite some time. But I agree with the author that there is a "Running hugo server -D now!!! ... Where is it!!!!" problem when fol
by powersnail 4y ago
Love Hugo. Been using Hugo for quite some time. But I agree with the author that there is a "Running hugo server -D now!!! ... Where is it!!!!" problem when following the tutorial.
Hugo has many "magic" based on names, "index.md" vs "_index.md", template look up hierarchy, global variables and functions (sometimes capitalized, sometimes not; some are behind a context, some are not), etc. It's hard to tell what name is required, what is configurable, and what is just accident, until you've delved into the detailed documentation. And to make the matter more complicated, themes sometimes use name magics, too.
I also hope that Hugo can just allow piping stuff through external programs in its templates. Right now, Hugo provides a pretty large number of APIs on resource transformation, regexes, string manipulation, and hell, you can even download stuff in templates. But to be honest, it's way easier to just write a shell script.
If I were to make my own static site generator, I think I'd probably opt for less flexibility, and simpler logic, especially with regard to what file ends up where. Let the generator handle the basic MD->HTML transformation, the skeleton of the site, producing feeds and metadata. And let external programs handle everything else.