9 ms·
I run a content website for a living. This year I switched from Craft CMS to my own static site generator. I no longer think about the server or the CMS. I no
by nicbou 3y ago
I run a content website for a living. This year I switched from Craft CMS to my own static site generator.
I no longer think about the server or the CMS. I no longer need to keep it updated. I got rid of the heavy database and the elaborate caching setup. Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance.
The best part for me is that I can work offline. It's just me and my text editor, so even my tiny Macbook 12" feels blazing fast.
Version control is also incredibly valuable. I can review my changes or roll them back. I can also find/replace across the entire content with regex. Text files are easy to work with.
I wrote about how it feels and why it works here: https://nicolasbouliane.com/projects/ursus https://nicolasbouliane.com/projects/ursus
- hinkley 3y agoI keep thinking one of the things we should look for in a nextgen version control system is a useful API. Many apps need VCS, not a database, and CMS is one of the clearest.
- Takennickname 3y agoWhat do you think would benefit other than content systems?
- ishanmahapatra 3y agoDid you name your SSG Ursus after the bear on Berlin’s flag?
- glogla 3y agoWow, that website loads so fast.
- jdsalaro 3y ago> Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance. Same here, I'm using Sphinx and loving it ! I very much appreciate the ability to get all nitty gritty whenever I want to implement something "special" like the Favorite Git Aliases post which when edited gets turned into a .bash_aliases file and pushed to Gitlab and mirrored to GitHub! :D For those curious it's over at https://jdsalaro.com https://jdsalaro.com , I don't have much details on my stack or why but I will be documenting bits here and there. I did start with my Markdown and Myst Cheatsheet for Sphinx (https://jdsalaro.com/cheatsheet/sphinx-myst-cheat-sheet/ https://jdsalaro.com/cheatsheet/sphinx-myst-cheat-sheet/) and how to load the environment.pickle (https://jdsalaro.com/howto/sphinx-load-environment-pickle/ https://jdsalaro.com/howto/sphinx-load-environment-pickle/)
- nicbou 3y agoThis is the fun part with simple text files. I built a linter for my content that runs like unit tests. I love your idea. It's very clever!
- defrost 3y agoAll About Berlin is a great little site - good work. https://allaboutberlin.com/ https://allaboutberlin.com/ Fast, complete in what it does, to the point. [ IMHO <cough> it could use a section on TV Series and Movies set in Berlin past and present with a quick rating on how realisticly they portray actual Berlin ... but that's just me :-) ]
- nicbou 3y agoI have something about movies set in Berlin, but I dread updating it. It's out of scope for me.
- Daril 3y agoThis is very interesting. Impressive how much efficiency and performance is gained. This also means that fewer resources (electricity) are consumed, that less bulky hardware is used and, most importantly, that security is improved. A static website is more difficult to attack and the only possible flaw is in the web server and not in the code of the website. I usually use Hugo. It is very complete and rich in features. I have also created a multilingual website using it. Have you considered integrating Turbo Hotwired into your static website? You could have an improvement in the responsiveness of the navigation and a reduction in the load on both the server and the client side. If necessary, Turbo can also be integrated with Mercure for live page streaming.
- nicbou 3y agoI have a robot vacuum cleaner that runs linux, and it CAN run a Caddy server. I managed to get a website running on it last time. Now that my websites are static I'm tempted to host my personal blog on it. I try to keep things simple. Simple websites are fast and reliable. Turbo seems to be a departure from that. Since the heaviest part of my pages is the text, it would not help much.
- bjornasm 3y agoPlease do this and write a blogpost about it!
- Daril 3y agoIn its simplest and most basic form, Turbo does it all for you. All you have to do is add the javascript files and when the user visits a page, Turbo will intercept the request, pass it to the server, retrieve the HTML response, extract the content of the body tag and surgically insert the content into the client browser. I'm using it on a couple of sites (including mine, a static one built with Hugo) and web applications and the difference in speed and responsiveness is remarkable. Of course you can go further. I'm now building a PWA using CodeIgniter and Turbo. The big advantage of this approach is that you can use "classic" technologies (HTML5 + backend) and achieve similar responsiveness to the modern Javascript frameworks, reusing all the existing backend code and logic.
- modernerd 3y agoStatic makes so much sense for sole-author sites with technical owners. Would be great to make the tech more accessible to those without the skills to recompile and deploy. It's such a fast and affordable way to build websites, but existing tools like Hugo assume a lot from users that can put the tooling out of reach. (Enjoyed your write-up too. I wrote the original version of html-to-markdown that you used in your migration; it's great to see it's still useful.)
- stn8188 3y agoI agree completely with this thought. So many people jump right to a wordpress because it can be "easy" (and as an EE, even figuring out the details of Hugo was pretty confusing for what basically amounts to an evening hobby). When I first started putting together my website [0] I considered the tradeoff between static and "dynamic", but constrained myself to the former because I didn't want to pay extra for hosting costs. The Fastmail file/website hosting has been absolutely incredible for this purpose. All-in-all, doing a static site has allowed me to learn so much more about html and other basic web technology than I think I would have ever gotten from a Wordpress or similar site. The biggest downside thus far is that I wanted to start a sort of Wiki-style knowledge base for users to contribute in my particular niche, but of course the static aspect precludes any user editing. I use that area of my site as my own knowledge-base still, putting info there that I reference all the time at my day job. For fun the other night, I got sucked down the rabbit hole of adding Disqus comments too. I don't expect anyone to ever use them, but instead was just learning about how to do it. [0] The site is at https://ShieldDigitalDesign.com https://ShieldDigitalDesign.com if anyone is curious to see what a dumb EE can do with a Hugo-generated site hosted with Fastmail.
- earthboundkid 3y agoHugo’s documentation site is poor. WordPress installation is a beast and involves getting PHP, Apache, and MySQL installed, which are each nontrivial. Hugo only seems more intimidating than WordPress because of the size of the documentation gap.
- 3y ago
- readingnews 3y agoI read your Ursus page with high interest. Do you plan on sharing the source/scripts/github? Do you plan on monetizing it? Personally, it sounds like something that would be great to check out.
- nicbou 3y agoIt's on https://github.com/nicbou/ursus https://github.com/nicbou/ursus. A slightly older version is on pypi. It's been running for a few months now, but only for two websites.
- camillomiller 3y agoSame question here! Cheers from Pberg.
- mjevans 3y agoAn edited site could also (mostly) be static if edits pushed / queued a job to publish the updated static content. Ideally a casual visitor would never see non-static content, other than possibly dynamic addins that mix the data client side if they have an active account.
- immibis 3y agoCMV: if you're running code on the server anyway, there's no advantage to having all the precomputed header+content+footer combinations. You may as well run a script that combines the generic header + specific content + generic footer at request time. The advantage of static sites is that you don't have to worry about any server scripting at all.
- mjevans 3y agoYou might be reading too much into the infrastructure. I was speaking generally. E.G. The workflow might be updating a database on the local system and a set of affected pages published. Or it could be modifying comments within source code files and a Makefile like regeneration of document files that are then rsynced to a host elsewhere. If there are user specific portions for some reason those would act more as a real application in sideband to the data, rather than a synchronous (and render blocking / load slowing) detraction from the experience.
- nicbou 3y agoOne benefit is that python scripts are easier to run on a dev machine than nginx. These days I rarely run the whole website with docker, just the Python static file server with `ursus -s`. It made a huge difference on my slow machine. I could listen to music and work at the same time without bringing the machine to a crawl.
- ksec 3y agoThis really should have been the case once we moved to SSD on server. For 95+% of all website, we likely have enough RAM to store 70% of the Hot Content in Cache and 30% of the content served from SSD at 10,000 IOPS Random Read. Unless you constantly fiddle with the site design, the site and HTML generation should really be on devices and the whole thing should take less than a second to generate. Unfortunately as other comments have said the current way of Github / Version Control / Text Editor are very much tech / Programmer focus. We need something like a hosted version of Wordpress, back to the old days of Dreamweaver / Frontpage.
- formerly_proven 3y agoLektor CMS is sort of a prototype-ish thing doing this: https://www.getlektor.com/ https://www.getlektor.com/ It has (used to have? Can't find them on the site now) pre-packaged binaries that you would drop into a folder structure generated by the technically-minded person, and the content editor can simply click on that binary, which opens the backend of the CMS in the web browser, make changes and click deploy. I suppose you could build this on top of Django as well, with django-distill, putting the distill-deploy step into the Django admin and then compiling that to a binary.
- andersa 3y agoIt's such a tragedy Intel completely dropped the ball on Optane drives. With them having an order of magnitude higher random IOPS, it would have been incredible for servers!
- immibis 3y agoSamsung claims to deliver half a million IOPS on 980 NVMe drives. Is that not enough for you? Previous generation 970 claims to deliver 50k IOPS
- andersa 3y agoThey claim that but it's not true. It will deliver significantly less than that in 4k random read. I don't have the link to benchmarks at hand right now, but there was a review running CrystalDiskMark on these drives and the 4k random performance of the Optane drive was more than 10x the 980 pro. For servers delivering tons of small-ish files, that's exactly the use case.
- eviks 3y agobut then formatting is awful in markdown, especially with all the template and tag syntax you add there which sometimes take more space than the actual words they mark up, and also due to all the tags you can't search/find/replace across the entire content, how do you find a "__bold__ in a phrase" or "bold in a __phrase__" reliably?
- nicbou 3y agoI spend most of my time editing markdown, and this was never an issue. On the other hand, now I can use any search and editing utility I want, not just whatever my CMS provides. A good example is adding a space after the § character, which I use a lot. It would take five seconds to fix it across the website. A good text editor theme makes a big difference. I fine-tuned an existing Markdown theme for Sublime Text to better highlight the markup, especially headings.
- eviks 3y ago> and this was never an issue weird that broken search basics are not an issue, you extol the virtues of site search in your blog, that engine is capable of matching "shcfua" to "Schufa". Markdown, on the other hand, fails in search long before getting to fuzziness > § character, which I use a lot. It would take five seconds to fix it across the website True, and then forever to hunt down those few instances where § was used in a quote or something and should not have been fixed > I fine-tuned an existing Markdown theme for Sublime Text to better highlight the markup, especially headings. I "highlighted" most of text markup to make it invisible, a bold text is already visualy bold even in Sublime, why woud I need an extra __indicator__? And heading size is also the best highlighter, which plain text editors don't do But yeah, I wish there were Sublime-level tool for rich text so you wouldn't have to compromize like that...
- nicbou 3y agoSearch can be anything you want. It's just text. You are free to use the tools that work for you. I see the diff in Sublime Merge before committing, so I'm far less likely to break something. I used to make so many errors because the WYSIWYG editor caught a random keypress. Personally, I want those indicators to be there. I'm editing the text and the formatting. I want both to be on the screen. Frankly I don't need to convince you that this is better. I work with this 40 hours a week and it's better for me. Feel free to take a different approach, but also accept that this approach is tested and true for me.
- sarchertech 3y agoI did the same thing for my site. Custom generator in a few lines of ruby. It’s so much easier and it loads so much faster. https://www.networksfromscratch.com/ https://www.networksfromscratch.com/
- geek_at 3y agoI did the same with my blog. It was custom written in PHP and was fairly stable, no reddit/hn hug ever killed it but I wrote a wrapper to make it static and now I can host it on a Raspberry Pi with nginx. Even thought about making it solar powered because of the low energy needed.
- toddmorey 3y agoI love your Berlin site! It’s so clean, useful, and informative. May I ask how the revenue works? I just like that it’s not polluted with ads.
- nicbou 3y agoAffiliate marketing. I am just bery careful about which products I mention and how. People need a bank account, health insurance, liability insurance, etc. I get a cut when I refer them to a business. I work with pretty much every business though, so I don't need to sell anything.
- js2 3y agoI found my way to this page on your site: https://allaboutberlin.com/guides/movies-set-in-berlin https://allaboutberlin.com/guides/movies-set-in-berlin There's a typo in the TOC. … is being rendered literally I'm guessing because the ampersand is escaped accidentally. Also a few you might add to the list: Berlin Alexanderplatz (1980), Possession (1981), Gotcha! (1985), Suspiria (2018), Undine (2020)
- nicbou 3y agoThis is probably a remnant from the content migration. I have a few of those before. Thanks for the heads up! And yes, that page is woefully outdated. It's also missing One Two Three, Babylon Berlin, Dark (kind of) and many more.