by loganmarchione on 2/6/21, 4:51 PM with 17 comments
However, I'd like to ditch the LEMP stack and just serve static files for all of their advantages (speed, security, git-based, etc...)
I've been looking at Hugo, Jekyll, and Pelican. However, I don't want to lose features like search, comments, RSS, etc...
Does everyone who switches to a static-site generator make these sacrifices? I really like interacting with my readers in the comments and I think the search is really useful.
I've found things like Grav, which still use PHP, but ditch the database for markdown files. The PHP allows the use of search, comments, etc.., but obviously isn't "static".
I would appreciate any advice. Thanks!
by dinkleberg on 2/6/21, 5:10 PM
If you want to nerd out and build the ultimate blogging system and probably never write more than a couple posts, go the static site generator route.
I’ve been down this rabbit hole many times and every time I use a static site generator I end up writing a couple posts about SSG and then give up. My most consistent blogging was when I was using Wordpress or ghost.
by abhinav22 on 2/6/21, 5:30 PM
Us tech people get caught up into a trap of trying to over optimize our setups. My favourite quote, applying it in a slightly different context that when it was originally written, is “Premature optimization is the root of all evil”.
Spend most of your time on what matters most, and only update your tech stack if it’s necessary (eg a static site could help reduce server bills - that’s a worthwhile reason).
by blackcats on 2/7/21, 12:54 PM
In terms of maintenance it can save you tons of time. For having to reset database server or doing migrations.
In terms of SEO you need to be very careful. WP does a lot of things right like canonical links, sitemaps and what not.
You can have comments on a static blog. I use static comments, I hacked together this solution: https://bsdnerds.org/comments-static-site/ But dynamic are possible with isso, disquz, and others for a few bucks.
Search is possible with some JS fiddling. I have no idea about RSS.
The magic keyword is “Jamstack”. You can do all dynamic parts with JavaScript and APIs
Just pick the generator wisely. I had quite a few annoyances with Hexo but I’m to lazy to convert to something else. Pelican seems quite good and Jekyll and Hugo have everything, but my Ruby and Go skills are rusty.
Overall it can save you many hours of time compared to wordpress. Plus you can use vim (or your favorite editor), plus less attack surface, plus can be decentralized so a lot faster. Google doesnt seem to care to much about speed, but the other benefits are worth it for me
by butz on 2/6/21, 6:29 PM
by smlckz on 2/7/21, 2:32 PM
by godot on 2/7/21, 7:06 AM
---
My personal blog -- a long time ago I've maintained a Wordpress blog, which have long been abandoned. The past 6-7 years I've maintained some articles on Medium (and more recently dev.to) instead, and about a year ago decided to fully move to my own, statically-generated site.
I love the speed and security and git-based (backed up by nature) structure. I decided to opt for utteranc.es for comments (no one ever commented anyway, heh), but there are also other options for hosted comments.
The thing that I did miss is a nice interface for writing. I thought I wouldn't mind writing raw markdown files in a code editor, but I actually did. More recently I am experimenting with Netlify CMS, which works ok, but I'll have to use it more before I decide if it's good or not.
---
Another web site owned and maintained by a family member, which had been live for 20+ years -- I had to move it to a more modern system than just pure html files (thousands of articles pages!), and I chose something more like your latter option, but not exactly Grav. (I chose PicoCMS, which is also in PHP, and also file-based, with markdown files for content) It certainly allows the site to continue offering RSS feeds and other features with ease (a lot of plugins available with Pico). That site ended up going with hosted comments anyway so commenting wasn't a factor.
There has pretty much been no drawbacks to this approach, other than using php and "old tech". I do like that all the content files are now in markdown though, which allows for moving to full SSG in the future easily. To be honest, if you aren't all about going with the trendy movement of SSG blogs, I think this option works totally fine. I can see this web site running with this same structure (and using PicoCMS) for years to come.
by frompdx on 2/6/21, 7:24 PM
Some things that hold me back:
- The migration process. I don't really want to invest a lot of time in migrating everything to a new tool.
- Automatic generation of things that are important to me like sitemaps. I would say RSS but I don't think anyone actually subscribes to my RSS anyway.
- Media management. A lot of my posts include pictures. Something I really appreciate about WordPress is how easy it is to do things like adjust the size of an image for a given post as well as adjust how the text flows around the image. I know you can do all of this with CSS, but then I would have to memorize all of that. I nice compromise would be something like a modern day Front Page (in the sense of being desktop first) with in editor tools for things like linking to other pages, posts, and tags as well as adjusting image position and size.
- Analytics. I guess it isn't terribly important. I don't get a ton of traffic, but knowing how many page views I get is something that keeps me going regardless. I do hate how absurdly bloated jetpack is though.
What I really want:
- Markdown first authoring with some WYSIYG features for managing media, page links, tags, categories, and permalinks.
- Desktop first editor that uses git for storage and tracking changes.
- Automatic generation of sitemaps and rss.
- Some way to track page views.
- Easy migration from WordPress. Ideally it will be something like "install this plugin and download the export of your blog".
- Configurable theming. It'd be nice to have a way to put together different wrappers for your site with the CSS lib of your choosing.
- Export everything as a nice static bundle that is easy to deploy from the desktop tool.
There is probably more that I can't think of right now. I've often thought of building something myself, but that would take away from my writing time. In the end I always end up sticking with WordPress because it mostly does everything I want it to do.
by ecesena on 2/7/21, 6:21 PM
For search, I have this example [1] (source code: [2]). This is docs instead of a blog, but it's really just the theme... I didn't have to do anything for search to work.
Hope this helps.
by waldekm on 2/6/21, 5:24 PM
I love the simplicity of the setup and the fact that there are no updates I must run to avoid security vulnerabilities or other issues or that I must make regular backups and test if they work. I can rebuild the whole site simply by pushing a commit to the repo. For a blog or a simple site I find SSGs totally worth it.
by seanwilson on 2/6/21, 7:15 PM
by nunodonato on 2/15/21, 8:52 AM
by the__alchemist on 2/7/21, 8:28 AM
by 1123581321 on 2/7/21, 2:42 AM
by rovr138 on 2/7/21, 2:26 PM
by jes on 2/6/21, 5:05 PM