Hacker News new | past | comments | ask | show | jobs | submit login

You can just write HTML too. It is much simpler, easier to maintain, and more secure (using a real webserver). Make .html files, open them in a text editor, type in the HTML. Here, I'll make an example like the minimum viable hugo.

$ sudo apt get install nginx

<html><head><title>Lorem ipsum dolor sit amet</title></head><body><h1>Lorem ipsum dolor sit amet</h1></body></html>

And now save it as index.html in the www directory that installing nginx creates. Check it out at http://127.0.0.1/ . Go to your router and forward port 80 to the IP address of the computer running nginx to make it public.




I think the intent of OP was to help people get setup with Hugo so your comment is pretty off topic. Yes you could set up php, elm, a full lamp stack, rails, heck you dont even need nginx to serve a static .html file but none of that will help someone get setup with Hugo if that's what they want to use for static site generation.


Ignoring your sarcasm: nobody wants that, for good reason.


I'm not being sarcastic. It is what I've done for 20+ years (although I only switched from thttpd to nginx in ~2010). The linked article does not really teach you how to use hugo. It just shows how to generate a single page, and there are far better ways to do that.

And like others have said, nginx comes with server side includes built in. It's the perfect amount of dynamic templating power with the minimal attack surface. Before anyone jumps in with, "but I can deploy (or other cargo cult terms) my website to a CDN if I use Hugo for templating." I question the utility and complexity of bringing in a CDN in this, minimum viable context or any personal website context.


I can deploy [sic] my website to a static file serving service for virtually free (e.g. S3, GitHub Pages, Azure Static Sites, etc.) without having a CDN and without having to worry about renewing SSL certs, managing a full linux instance or container, patching the web server when stuff gets hacked, doing maintenance, etc.

There's a ton of value in 'just static pages', and if you do more than 1, not writing your own HTML is pretty great.


What do you think is the good reason?


HTML files can't reuse anything, HTML is a pretty bad verbose language, it is hard to keep indexes and links up to date when you change your site, and well, a lot of other reasons that I didn't think about because I gave-up on that in the 90's.


because writing HTML manually is fucking terrible compared to authoring markdown. We (i.e. everybody) are trying to improve things because they are bad.


I mean, I agree that incremental improvements are great but also I think your hyperbole is a bit of an overreaction. I use markdown and templates and Software people rightly prefer reuse and DRY principles but handwriting html is honestly only barely a notch more primitive.


Use SSI for header/footer/menu segments and write about 5 lines of bash and you've got all the site generator you need, too, and you can run your "generator" on basically any unixy machine without installing anything.

I find writing raw HTML for basic documents to be very fast and easy with a modern editor with hinting/autocomplete. Not any slower than Markdown, really.


I wrote a bash script (https://gist.github.com/lelanthran/2634fc2508c93a437ba5ca511...) that lets me very simply add new posts to my blog.

For my actual blog I reversed the order that the first are processed. Looks okay, I think, just short on functionality (no I Tractivity).

https://www.lelanthran.com ... feedback welcome.


Doesn't SSI kind of make the site not static anymore?


What is SSI?



As an oldie on the web, i would state that while it might be "ancient, arcane", but it was amazingly awesome at the time....and some still leverage this neat technology to great benefit. ;-)


Hugo also typically uses a real webserver like nginx... it just gives you some niceties like templating and SASS on top of that.


nginx is magic


Blasphemy! I must overcomplicate it so the build takes a significant amount of time in the CI workflow. /s


Hugo builds and Jekyll builds are basically instantaneous even for really large websites. I mean less than one second. Like 30ms. You don't even see it happen. Migrating your manually crafted HTML pages to something other than NGINX or changing the theme or website is going to be such a pain in the ass you're going to wish you never thought of this "minimalist" way of doing it. If you look at the website of the guy above at superkuh.com it looks like shit (subjective, of course), doesn't even have a TLS certificate and above all would be an extreme pain to change the layout, design, deployment, etc. I don't even know what to say about this chart in his last post at http://erewhon.superkuh.com/pictures/blog-posts-vs-blog-post... although I must admit it's really funny.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: