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

Aren't static site generators supposed to umm, generate a static site, so one wouldn't have to maintain any binaries?



Something has to generate that static site if it isn't being hand written, no?

Having a single binary that does that is easier to maintain than a script plus a stack of ever-changing dependencies.


Comment I replied to was describing the troubles caused by dev machine and server going out-of-sync.


I think many have a setup where the server grabs your website repo and creates your site. It's generally good to create your static files directly from your actual repo, whether that's on the host server or an artifact builder, etc.


The obvious thing that jumps to mind is CI/CD systems like Travis and Gitlab CI. The workflow for a lot of folks is to push to a git endpoint and then have the site picked up and then compiled automatically, rather than building on the dev machine then pushing.


Oh, I see.

I initially thought the comment was just about dependency hell, but now upon re-reading I find myself wondering what sort of (static site) setup requires both server and dev machine to share dependency state.

Maybe in the case of off-line testing before a push to remote?

Thanks for clarifying for me.


Yes, my workflow is localhost development and testing, then pushing to a git repo and call via a hook a CI system which is used for both deployment and validation that the code works in a vanilla/reproducable environment.

Deployment via CI is important, because you may don't want all your devs to have ssh/ftp credentials to the server, or maybe you want to be able to work from many computers, yet prefer to keep your server ssh keys in only one.

Another issue is that multiple developers can use different operating systems. To be honest I have no idea how to setup jekyll on OS X or Windows. For hugo I just say to my devs “download and run this file”.


Yes. When I write for my github pages blog, my edit-compile-debug cycle includes pushing to github and seeing how my post is rendered. I often get several minor edit pushes in a row.

If I had jekyll set up on my home environment, I could avoid that - but if the environment was different from github's, then I'd only be able to avoid it most of the time.


GitHub provides a gem that does a decent job of replicating their Pages environment. It's not well advertised, but does work well [1].

[1] https://github.com/github/pages-gem




Consider applying for YC's first-ever Fall batch! Applications are open till Aug 27.

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

Search: