Live data from Hacker News

Build Static Websites

eager.io

11–20 of 60 posts

Re: Build Static Websites

#11
post #2

How do plugins like WP Super Cache https://wordpress.org/plugins/wp-super-cache/ compare with straight HTML pages? The extra overhead is in the PHP serving up the cached HTML page, but how effective is it in comparison? More of the static site development setups don't have an admin system that compares with WP, is there a WP plugin to export to a static site? Edit: WP caching benchmarks http://cd34.com/blog/scalabili…

You're right about the admin part. There are hybrids out there like http://siteleaf.com and http://webhook.com. As far as no-db goes I like to use Kirby (http://getkirby.com). My favorite setup is middleman though. We built our documentation site using middleman and github sub modules (https://resources.catalyze.io)

Re: Build Static Websites

#12
post #4

Earlier quoted context omitted.

> is there a WP plugin to export to a static site? Here is one I found [1], I've never used it though, so I don't know how good it is. I'm sure there are others as well. It would be nice if there were a static site generator with an interface as nice as WP. [1]: https://github.com/megumiteam/staticpress

It would be nice if wordpress itself had the option of pressing a button saying - push to static. When you make an edit -> update static files. This would be fantastically easier + it would potentially mean 1/4 of the web gets faster overnight.

Unfortunately you'd have to at least modify most WP plugins to get them to work with this new system. At some point it becomes easier just to try to move everyone over to a born-static platform like Ghost.

Re: Build Static Websites

#14
post #2

How do plugins like WP Super Cache https://wordpress.org/plugins/wp-super-cache/ compare with straight HTML pages? The extra overhead is in the PHP serving up the cached HTML page, but how effective is it in comparison? More of the static site development setups don't have an admin system that compares with WP, is there a WP plugin to export to a static site? Edit: WP caching benchmarks http://cd34.com/blog/scalabili…

WP Super Cache is a good starting point. Taken alone is not enough though.

Most web shared hosting where custom wp are configured use Apache which doesn't solve the problem because apache (2.2, the 2.4 version should have improved a bit) spawns processes containing the PHP modules, therefore using more ram than it actually needs to process an html page.

This issue is vastly solved if you have a Nginx webserver with a good configuration.

You can also improve that if you use memcached and the nginx memcached_pass, which directly outputs the memcached cached html without passing through php, giving a super-boost to response times. (to use this feature, checkout the WP-FFPC plugin) If one page ends up on reddit/hackernews/producthunt homepage, a system designed like this should support the bump with relatively small issue.

Obviously if many people start commenting you will still have performance issue because that's when the php part is called (and that's the most memory expensive).

Re: Build Static Websites

#16
post #10
post #6

Absolutely, take static as far as you possibly can. In a world with S3 and Cloudfront, there is really no reason for a static site to ever be down. This is great for a company's marketing focused web presence. But often the reason you're getting all those visitors to your site in the first place is that it does something valuable that requires data persistence, which usually implies user sessions, which implies authe…

Just to take it a step further though, in a world where every browser can run Javascript and make AJAX requests, which of your requirements can't be handled by the client communicating with an API directly? Considering sessions for example, local storage is supported by virtually every browser you can name: http://caniuse.com/#feat=namevalue-storage In my experience, it's significantly easier to scale an API than a t…

Why can't sessions be handled by by communicating with an API directly?

Re: Build Static Websites

#17
Static website generators seem to come and go -- would anyone like to comment on one they like that seems to be lasting the test of time? The obvious one seems to be jekyll (possibly with octopress on top of it), but I'm interested in any others.

Re: Build Static Websites

#18
post #5
post #4

Earlier quoted context omitted.

It would be nice if wordpress itself had the option of pressing a button saying - push to static. When you make an edit -> update static files. This would be fantastically easier + it would potentially mean 1/4 of the web gets faster overnight.

+1 oh man, that's a great idea, that would grow WP adoption rate by 1000x

What makes you think that it would grow its adoption rate at all? If I were to take a guess, I'd say most Wordpress installations are done by people who don't care about server load, and don't fret out over a 2s load time instead of 200ms.

Re: Build Static Websites

#19

Static website generators seem to come and go -- would anyone like to comment on one they like that seems to be lasting the test of time? The obvious one seems to be jekyll (possibly with octopress on top of it), but I'm interested in any others.

I don't know about "lasting the test of time", but I recently used Hugo (Jekyll clone written in Go) and found it impressive.

http://gohugo.io/

Re: Build Static Websites

#20

Static website generators seem to come and go -- would anyone like to comment on one they like that seems to be lasting the test of time? The obvious one seems to be jekyll (possibly with octopress on top of it), but I'm interested in any others.

Pelican I've had great luck with so far, but I can't testify honestly to whether it will last. Since it is Python and makefiles, I have found it very easy to modify myself just with my background knowledge.
Post reply on HN