TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Use Jekyll To Keep Your Blog From Folding Under Traffic

48 点作者 kapilkale超过 12 年前

23 条评论

smacktoward超过 12 年前
The irony of these "static blogs are The Future" stories is that the first blogging software to get really popular, Movable Type, worked in exactly this way -- grinding out static files.<p>Which led to everyone moaning and groaning about what a pain it was to have to wait for the site to rebuild when you made a change.<p>Which led to WordPress, which used live queries against the database to avoid the need for rebuilding, being hailed as The Future.<p>Which led to everyone moaning and groaning about how their blog would fall over anytime five people even thought about visiting it.<p>Which led to tools like Jekyll, which grind out static pages, being hailed as The Future.<p>Sometimes tech feels less like a story of progress and more like a merry-go-round...
评论 #4615646 未加载
评论 #4615642 未加载
laktek超过 12 年前
I host my blog at Amazon S3, not only it takes away the worry of high traffic, it almost cost nothing (I paid $1 last month for 8GB of transfers). I wrote about the setup sometime back - <a href="http://laktek.com/2011/11/17/why-and-how-i-revamped-my-blog" rel="nofollow">http://laktek.com/2011/11/17/why-and-how-i-revamped-my-blog</a><p>While Jekyll is a nice fit for creating and maintaining a blog, it's an overkill for running other kinds of static sites. I felt there's a need for a simple and more flexible static site generator, so I wrote Punch (<a href="http://github.com/laktek/punch" rel="nofollow">http://github.com/laktek/punch</a>).<p>These days, I'm working on a Punch based extension to generate blogs as well, which solves couple of pains I have with Jekyll (such as slow generation, non-existent error handling, lack of support for partials and rigidness in templating, etc.)
评论 #4615376 未加载
评论 #4615816 未加载
elithrar超过 12 年前
I use Octopress (<a href="http://octopress.org/" rel="nofollow">http://octopress.org/</a>) for my own blog[1], which is a Jekyll "framework". Styles, templates, RSS, etc. is all ready to go and you can tweak those without needing to build it from scratch.<p>There's still certainly more development time than a pre-packaged blog, the "new post" workflow requires a couple of lines on the CLI (rake new_post[title]; $EDITOR path/to/new/post/title.md), and there's no clear documentation on creating your own theme (I ported Bootstrap over to Octopress as a self-contained theme), but it can be a nice option for those who want some flexibility. I just host it all on Heroku out of laziness, although I would likely see some speed improvements if I hosted it on a VPS w/ nginx.<p>FWIW, I used to host my blog on Tumblr, until they added fixed Open Graph metadata to the site headers that resulted in me unable to show/change a photo thumbnail when sharing to Facebook (a specific issue, and really not their problem to think about).<p>Also, as others have said, GitHub Pages is a very low-friction alternative to DIY'ing your own Jekyll site and you can always fork a popular users' site to get you up-and-running quickly.<p>[1]: <a href="https://github.com/elithrar/octopress" rel="nofollow">https://github.com/elithrar/octopress</a>
评论 #4615242 未加载
评论 #4615091 未加载
hpaavola超过 12 年前
One great thing about these static file generators is that they make it easier to preserve history.<p>You can't just leave Wordpress based blog to linger on your server after you have quit blogging. It will occasionally eat all your resources and every once in a while new gaping security holes are found which need to be patched. And if you decide to switch hosting provider, it's a hassle.<p>With static files all these problems go away and maybe our kids get to see what daddy wrote 30 years ago.
评论 #4616130 未加载
koenbok超过 12 年前
Shameless plug: if you like your static site generator simpler, in python/django and with amazon s3 deployment built in check my project Cactus: <a href="http://github.com/koenbok/Cactus" rel="nofollow">http://github.com/koenbok/Cactus</a>
inghoff超过 12 年前
I've grown more and more into thinking having a database is maybe overkill for only a blog. I do use Octopress too and it really makes you think "do you really need a DB for that?"<p>If you compile your posts into HTML, use Javascript for more dynamic content (like comments by Disqus or a Twitter feed, for example), HTML files take almost no resources to serve, so you can handle a huge load without many resources.
flexterra超过 12 年前
I tried octopress and it turned into a nightmare, because I had to migrate hundreds of posts and wanted a custom theme. Making a custom theme proved to be harder than what I was able to tolerate.<p>Now I use Wordpress with WP Super Cache plugin which effectively turns my site into a bunch of static files. My site has gotten a lot of traffic from HN and reddit without ever going offline and I made a custom theme in a few hours.<p><a href="http://elweb.co" rel="nofollow">http://elweb.co</a>
davidbanham超过 12 年前
You need to go deeper.<p>Take all those static files you've generated and just put them right on Akamai. Don't even worry about scaling your infrastructure on Heroku or EC2, because it's all on Akamai.<p>It's dirt cheap and really easy to keep updated if you do it right. I presented this at SydJS a little while ago, my slides are here:<p><a href="http://revealjs.jit.su/#/5" rel="nofollow">http://revealjs.jit.su/#/5</a>
helpbygrace超过 12 年前
I'm using Hakyll which derived from Jekyll with Git server. It is quite appropriate for personal simple website like mine.<p>To edit page for website, just open terminal and edit and git commit &#38; push. That's all. After git server accept the push request, it rebuilds and publishes the website automatically like Github with Jekyll.
JamesLeonis超过 12 年前
I recently ported my blog to Jekyll/Github pages, and I couldn't be happier. It becomes an interesting challenge to figure out how to implement common blog features, like RSS, tags, and comments without a back-end to call to. Building a custom theme is likewise a small challenge, but is IMHO easier than building one for a blog system like Wordpress or Tumblr. I also like that it's easy to back up. I have a git clone on two computers as well as Github [1].<p>Right now I'm experimenting with a tags in javascript that mimics the functionality used in other blog implementations.<p>[1]: <a href="https://github.com/jamesleonis/jamesleonis.github.com" rel="nofollow">https://github.com/jamesleonis/jamesleonis.github.com</a>
marcrosoft超过 12 年前
I got sick of Wordpress security issues and updates so I moved my blog to Octopress.<p>What is even better is that you can host those files without a server environment with Amazon S3 and cloudfront.
willholloway超过 12 年前
Static sites hosted on S3 have become my specialty lately. Not just for blogs. You can do a lot with html,css and javascript. I have created and maintained dozens upon dozens of Drupal sites over the years, and the frequent core and module updates are quite annoying. I've heard it said that sites for Churches have more malware than porn sites, probably because so many run out of date wordpress installations.
评论 #4617651 未加载
Axsuul超过 12 年前
Static sites are great except they limit what sort of content you can put on your site. Varnish is a great way to make your blog "web scale".
TomGullen超过 12 年前
This doesn't seem to be solving the root cause of the problem.<p>Seriously, if your website can't handle bursts of traffic like HN would give - upgrade your server. Pay more. Do it now and don't wait for it to fail.<p>Jekyll sounds clever, but I would be interested to know the benefits of using it over learning how to cache content properly in your server side language, or just getting a better server.
评论 #4615080 未加载
评论 #4615154 未加载
dannygarcia超过 12 年前
Jekyll's really great. I found that it makes publishing articles super easy (especially with GitHub Pages) while giving you full control of your front-end.<p>If you use grunt.js, you might like this grunt-jekyll plugin I wrote: <a href="https://github.com/dannygarcia/grunt-jekyll" rel="nofollow">https://github.com/dannygarcia/grunt-jekyll</a>
yesimahuman超过 12 年前
I use Jekyll+GitHub Pages for my personal blog. It works fine, but I recently started using Wordpress for my company blogs, and I prefer it quite a bit. I use WP Engine for my blog hosting now and my blogs rarely have problems under load now.
pdonis超过 12 年前
I've looked at Jekyll, but even it was a bit too complex for my needs (plus, I'd rather use Python than Ruby...). So I rolled my own: <a href="https://github.com/pdonis/simpleblog" rel="nofollow">https://github.com/pdonis/simpleblog</a>
cmwelsh超过 12 年前
I find it's easier to use a fully hosted platform like Tumblr with a custom domain, but if you like Jekyll then GitHub pages is pretty awesome.<p>If you're using WordPress, install a full page caching plugin.
MatthewPhillips超过 12 年前
No reason to make things so complicated. HTML5 tags makes writing your blog in plain HTML/CSS a breeze. On nginx with a cheap vps you'll handle any load.
pessimism超过 12 年前
On that note, does anyone know a working S3 policy script to prevent hotlinking outside your domain/bucket? I can't get any to work.
kmfrk超过 12 年前
Maybe someone should create a <i>Use WP-Cache</i> website similar to the famous <i>Use bcrypt</i>.
mshang超过 12 年前
Then why bother using Heroku at all? GitHub Pages supports Jekyll.
评论 #4615007 未加载
评论 #4615160 未加载
评论 #4615156 未加载
kayman超过 12 年前
+1 for Hyde. +2 for Emacs Org mode to xhtml