

Using Jekyll and GitHub Pages for Our Site - AdesR
http://developmentseed.org/blog/2011/09/09/jekyll-github-pages/

======
LeafStorm
I have never used Jekyll. I do, however, frequently use nanoc[1] - it takes a
bit more effort to set up, but it is _far_ more flexible, because instead of
ridiculous configuration files, you are actually writing Ruby code (in a very
nice DSL, might I add) that controls how each set of files is compiled.

One thing I did with it was create a Web site with recipes on it. The recipe
files didn't have any actual content, everything was stored in the metadata. I
had the Rules file set up so that they would run the Recipes through a layout
that would expand them to HTML ( _consistently_ ), then _that_ was run through
the normal page template.

It also used a preprocess rule to generate fresh items "on the fly" that serve
as indices for each recipe type. Again, no content - the Rules file is set up
so that the artificial items get all their content from a layout before being
_actually_ layouted with the site template.

[1]: <http://nanoc.stoneship.org/>

~~~
winton
And even more simple and powerful than nanoc:

<http://stasis.me>

~~~
cal2
Huh?

I think Stasis is great in theory, but a few things are preventing me from
using it full time. Namely that I can't pass simple options to a template
engine (of which I do a lot).

It appears that you're the author. Can you offer any information on how Stasis
is, in some ways, better than nanoc?

~~~
winton
You are right. I would appreciate a fork to fix this very minor issue, but if
not I will be getting to it very soon.

It can do everything nanoc does, but the execution is much simpler and much
more natural. This is not just my opinion, but what I have heard from lots of
people.

My apologies for the self-promotion, just trying to get the word out.

------
amirhhz
Ever since I installed Wappalyzer in my browser (detects what frameworks and
technologies a website uses) more and more often I come across websites that I
am shocked use so many backend and frontend frameworks. I'm shocked because
that means they are spending unnecessary amounts of money, time and effort on
hosting (e.g. Wordpress hosting), development and maintenance when the entire
site would be perfectly well-served (and faster!) with static pages.

The problem until recently was that there weren't appropriate tools for the
job, but this article should prove that's now changing.

~~~
jordanlev
I agree that a lot of frameworks are overkill, but if you put yourself in the
frame of mind of a non-programming designer or a layperson who just needs to
manage content on their site, using a static HTML generation tool is out of
the question. I've been using octopress/jekyll recently and think it's amazing
and really love it, but there's no way in a million years I could give that to
a client to manage their own website.

Also, it's not really wasting time or money -- cheap shared hosting costs the
same regardless of whether you're serving a php/mysql app or static html
files. And setting up a wordpress site is probably easier for non-programmers
than getting a jekyll setup going.

It's definitely a colossal waste of CPU power though, but that train left the
station 10 years ago.

~~~
LeafStorm
An interesting idea that I had once is a server-side application that can edit
the site files, save them to Git or Mercurial, and then compile them
statically and push to a server via FTP, SFTP, WebDAV, S3 API, or rsync.

~~~
simonbrown
CushyCMS does that, but without DVCS (although it does support versioning).

------
xal
Powers the Shopify website as well by the way. Jekyll was a good fit since we
made Liquid and are therefore really familiar with it.

------
mhd
What I always found a bit annoying about jekyll (at least without plugin or
forks) is that something like <http://developmentseed.org/blog/2011/> or
<http://developmentseed.org/blog/2011/09/> doesn't work, i.e. the set of
archive pages is pretty limited. You get one big one, and then a simple
numeric pagination. I used some perl script ages ago (blosxom?), and it did
just that.

Still, I guess I can hack that into the code somehow…

One "prepackaged" jekyll configuration that looks quite interesting is
Octopress: <http://octopress.org/>

~~~
socratic
Would/do Jose Diaz-Gonzalez's plug-ins solve your problem?

[https://github.com/josegonzalez/josediazgonzalez.com/tree/ma...](https://github.com/josegonzalez/josediazgonzalez.com/tree/master/_plugins)

~~~
josegonzalez
I'd like to note that while I did spend quite a while on these plugins, I used
it solely as an exercise to learn Ruby. So this is definitely not the best
Ruby code.

------
jordanlev
If you're interesting in this, you should also check out Octopress, which sits
on top of Jekyll and provides a nice default theme, handy addons (for google
site search, disqus comments, twitter/facebook sharing, etc.), and deployment
scripts.

<http://octopress.org/>

~~~
rcfox
Does GitHub support Jekyll plugins? I doubt they'd be willing to run arbitrary
code for everyone...

~~~
jordanlev
Well, they're not really Jekyll plugins -- just Javascript plugins on the
front-end (hence disqus comments instead of your own database of comments,
google custom search instead of your own internal search engine, etc.)

~~~
rcfox
Sorry, I was referring to these plugins: <http://octopress.org/docs/plugins/>

~~~
jordanlev
Oh, I get it. Those plugins are "compile-time" -- so they happen during the
HTML generation process, before going up to github -- all github ever sees is
static HTML and CSS files.

~~~
calloc
But github does that part for you. You push up the raw files AND Github runs
Jekyll and generates the HTML files.

~~~
mkopinsky
Could you have this as a two stage process? Make changes to files, push to my
repo, repo hook runs jeckyll, commits new static assets, and pushes to github?
This does require using a central server other than github I guess, though...

~~~
pyre
You could make a local shell script or Makefile that pulls together those
commands and then pushes to github. No need for a central server.

------
AdesR
the maps on the site are designed in
[tilemill](<http://tilemill.com/pages/index.html>), and served by
[tilestream](<http://mapbox.com/#/tilestream>), btw.

------
sramov
Excellent execution, custom YAML fields allow for a lot of options.

I do the same, except I host at NearlyFreeSpeech.NET, which just feels right.

