Live data from Hacker News

Show HN: Generate a static website from any back end

sitesauce.app

51–60 of 69 posts

Re: Show HN: Generate a static website from any back end

#53
post #49
post #46

Earlier quoted context omitted.

Well I had to do our corporate team site and got so frustrated with SharePoint that I coded a script in python to generate the html from rst files. It was a couple of days of work. It runs behind nginx and automatically updated on GitHub commit of new content. Bootstrap is very well documented and you can use rst directives for “widgets”. I am in the process of moving to markdown + yaml now to make writing content ev…

Why not just use any other static site generator like Hugo instead of re-inventing it?

I can answer that, since I also made a small static site generator from scratch in python.

I was using another static site generator (Hexo), but at some point I wanted to change some things and add some custom html to my posts. Since the documentation was ... well ... minimalistic on some aspects, I also spent some time looking at the source code. But at that point I was really wondering what benefit I still had from using that generator.

In the end, all a static site generator does is collecting some markdown or RST files, converting them to html and putting that into a template html file. And generating some lists (index page, RSS, ...) and some metadata for SEO. So it took me a single Saturday to make a working static site generator and now I can do anything I want without looking up documentation or source code, since it's my own dumpster fire :-)

Re: Show HN: Generate a static website from any back end

#54
post #23

I love this site. It's truly impressive for any solo founder, regardless of the age, let along an 18 year old. Yeah, you kind of rely on the generosity of your vendor (Vercel, in this case), but that's really the only option if you want to keep costs low. I hated Wordpress so much so that I wrote my own CMS + static site generator using a different approach and used it for clients who run sites with 3 million+ visito…

Emm.. doesn’t proxy cache give like the same result?

No. Proxy cache was our first approach. Proxy cache solves the performance problem. There's also the issue of code mess in most Wordpress themes. We used Pagespeed as reference and our score -with- proxy cache was about 60. Once we re-wrote the theme in our static site framework, the Pagespeed score was 95. Could I have achieved the same with PHP? Probably. The biggest problem is Wordpress doesn't have an MVC like framework which makes it easy to write messy code even for experienced developers. Plus, Elixir, the language I used is miles ahead of PHP.

Right now, we have MVC down to the theme level. It helps write cleaner code and writing integrations to our site much much faster. There's tons of integrations that large media sites actually use. Eg. ad server related, tracking related, etc.

Re: Show HN: Generate a static website from any back end

#55
post #44
post #23

I love this site. It's truly impressive for any solo founder, regardless of the age, let along an 18 year old. Yeah, you kind of rely on the generosity of your vendor (Vercel, in this case), but that's really the only option if you want to keep costs low. I hated Wordpress so much so that I wrote my own CMS + static site generator using a different approach and used it for clients who run sites with 3 million+ visito…

This is a cute story, but what was -actual- the cost (time, monetary and opportunity) in building your own CMS instead of applying basic performance tweaks to an off the shelf system?

This static site project didn't cost much for my client. I wrote the entire engine over a span of close to 2 years using my personal time over the weekends, trying to re-write it in different languages, frameworks, etc.I did a re-write in all possible methods out there - Including Jekyll, Middleman, Hugo, etc. In the end, I settled with Elixir / Phoenix. Money, if you factor in my personal time valued at $X00 USD/hr, then yeah, multiply that with 8 hours a weekend for 2 years, that was probably the cost. For my clients? Just about a month. The clients didn't lose any opportunity because of this move. They were still on Wordpress as this was being tailored for them.

These OTS static site generators are fine for small sites, but at the scale of our clients who have more than 30k posts and counting, none of these would be able to handle it. When I say handle it, I also am referring the time taken to generate 30,000 posts in the shortest possible time. In a custom solution, you're able to optimize this heavily. I brought it down to 30 minutes from 1.5 hours for 30k posts.

Why not simply add a caching layer infront of a Wordpress instance? For starters, this is a media company, so they would like to have instantly updated posts on certain parts of their site. For that, you need to disable caching. Which means tens of thousands of requests are hitting your instance every minute. So, that means you need a high performance server + SQL instance (Expensive). It worked out to $3000USD per month just for servers alone.

The static site generator use just $100/month instance, for comparison. Of course, there is also the development cost for the client for this solution, but I can comfortably share that their ROI would be less than a year if you factor just server costs alone.

There are many other bonuses with a custom static solution - Your whole theme can be broken down into an MVC paradigm which makes future integrations super clean and easy. Codebase maintainability also has improved drastically - partly because of the language itself (Elixir) and partly because of the MVC architecture.

Re: Show HN: Generate a static website from any back end

#56
post #49
post #46

Earlier quoted context omitted.

Well I had to do our corporate team site and got so frustrated with SharePoint that I coded a script in python to generate the html from rst files. It was a couple of days of work. It runs behind nginx and automatically updated on GitHub commit of new content. Bootstrap is very well documented and you can use rst directives for “widgets”. I am in the process of moving to markdown + yaml now to make writing content ev…

Why not just use any other static site generator like Hugo instead of re-inventing it?

Because my team has an easier time managing our simple code vs a new tool. Also we have a lot of custom components because we use our site to provide navigation for our apps, dashboards and docs. I couldn’t find a generator that would fit all those requirements.

Re: Show HN: Generate a static website from any back end

#57
Requiring a credit card before any functionality is enabled breaks the WordPress.org plugin directory guidelines.

To be compliant, the 7-day free trial should be possible without having to provide credit card details.

That is, in any case, best practice, unless profiting from people who forget to cancel is an important part of your business plan.

Re: Show HN: Generate a static website from any back end

#59
post #46
post #44

Earlier quoted context omitted.

This is a cute story, but what was -actual- the cost (time, monetary and opportunity) in building your own CMS instead of applying basic performance tweaks to an off the shelf system?

Well I had to do our corporate team site and got so frustrated with SharePoint that I coded a script in python to generate the html from rst files. It was a couple of days of work. It runs behind nginx and automatically updated on GitHub commit of new content. Bootstrap is very well documented and you can use rst directives for “widgets”. I am in the process of moving to markdown + yaml now to make writing content ev…

Google docs also has options to export to markdown.
Post reply on HN