From 1d7b30b760c8a016690fd4f3eda8470f78af6922 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 13:29:10 -0800 Subject: [PATCH 01/17] document filters --- README.textile | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index ac196267..2364d968 100644 --- a/README.textile +++ b/README.textile @@ -62,7 +62,35 @@ The autobuild feature can be used on any of the invocations. h2. Filters, Tags, and Blocks -h3. Include Tag +In addition to the built-in Liquid filters, tags, and blocks, Jekyll provides some additional items that you can use in your site. + +h3. Date to XML Schema (Filter) + +Convert a Time into XML Schema format. + + {{ site.time | date_to_xmlschema }} + +becomes + + 2008-11-17T13:07:54-08:00 + +h3. XML Escape (Filter) + +Escape some text for use in XML. + + {{ post.content | xml_escape }} + +h3. Number of Words (Filter) + +Count the number of words in some text. + + {{ post.content | number_of_words }} + +becomes + + 1337 + +h3. Include (Tag) If you have small page fragments that you wish to include in multiple places on your site, you can use the include tag. @@ -70,7 +98,7 @@ If you have small page fragments that you wish to include in multiple places on Jekyll expects all include files to be placed in an _includes directory at the root of your source dir. So this will embed the contents of /path/to/proto/site/_includes/sig.textile into the calling file. -h3. Code Highlighting Block +h3. Code Highlighting (Block) Jekyll has built in support for syntax highlighting of over "100 languages":http://pygments.org/languages/ via "Pygments":http://pygments.org/. From 528a18f7fd6c062a503a7c776d659659dc078879 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 13:41:50 -0800 Subject: [PATCH 02/17] reorganize readme --- README.textile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.textile b/README.textile index 2364d968..c6474aba 100644 --- a/README.textile +++ b/README.textile @@ -1,6 +1,6 @@ h1. Jekyll -Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. Visit "http://tom.preston-werner.com":http://tom.preston-werner.com to see an example of a Jekyll generated blog. +Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. Visit "http://tom.preston-werner.com":http://tom.preston-werner.com to see an example of a Jekyll generated blog. To understand how this all works, open up my "TPW":http://github.com/mojombo/tpw repo in a new browser window. I'll be referencing the code there. @@ -14,10 +14,6 @@ Posts are handled in a special way by Jekyll. The date you specify in the filena Files that do not reside in directories prefixed with an underscore are mirrored into a corresponding directory structure in the generated site. If a file does not have a YAML preface, it is not run through the Liquid interpreter. Binary files are copied over unmodified. -In order to convert your raw site into the finished version, you simply run: - -
$ jekyll /path/to/raw/site /path/to/place/generated/site
- Jekyll is still a very young project. I've only developed the exact functionality that I've needed. As time goes on I'd like to see the project mature and support additional features. If you end up using Jekyll for your own blog, drop me a line and let me know what you'd like to see in future versions. Better yet, fork the project over at GitHub and hack in the features yourself! h2. Example Proto-Site @@ -31,14 +27,24 @@ h2. Install The best way to install Jekyll is via RubyGems: - $ sudo gem install jekyll + $ sudo gem install mojombo-jekyll -s http://gems.github.com/ h2. Run $ cd /path/to/proto/site $ jekyll -This will generate the site and place it in /path/to/proto/site/_site. +This will generate the site and place it in /path/to/proto/site/_site. If you'd like the generated site placed somewhere else: + + $ jekyll /path/to/place/generated/site + +And if you don't want to be in the proto site root to run Jekyll: + + $ jekyll /path/to/proto/site /path/to/place/generated/site + +The autobuild feature can be used on any of the invocations. + +h2. Run Options There is an autobuild feature that will regenerate your site if any of the files change: @@ -50,15 +56,9 @@ enable it (it may take some time to run if you have many posts): $ jekyll --lsi -If you'd like the generated site placed somewhere else: +For static code highlighting, you can install Pygments (see below) and then use that to make your code blocks look pretty. To activate Pygments support during the conversion: - $ jekyll /path/to/place/generated/site - -And if you don't want to be in the proto site root to run Jekyll: - - $ jekyll /path/to/proto/site /path/to/place/generated/site - -The autobuild feature can be used on any of the invocations. + $ jekyll --pygments h2. Filters, Tags, and Blocks From 76976ebf3d267ff6cff4d9281b26ebc8947a802c Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 13:49:56 -0800 Subject: [PATCH 03/17] move bit about autobuild --- README.textile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.textile b/README.textile index c6474aba..48c0c906 100644 --- a/README.textile +++ b/README.textile @@ -41,12 +41,10 @@ This will generate the site and place it in /path/to/proto/site/_site. If you'd And if you don't want to be in the proto site root to run Jekyll: $ jekyll /path/to/proto/site /path/to/place/generated/site - -The autobuild feature can be used on any of the invocations. h2. Run Options -There is an autobuild feature that will regenerate your site if any of the files change: +There is an autobuild feature that will regenerate your site if any of the files change. The autobuild feature can be used on any of the invocations: $ jekyll --auto From 6b582ffc96174e91570ce96969506c17bc41f6b7 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 14:02:09 -0800 Subject: [PATCH 04/17] document liquid data --- README.textile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.textile b/README.textile index 48c0c906..15042a9d 100644 --- a/README.textile +++ b/README.textile @@ -58,6 +58,39 @@ For static code highlighting, you can install Pygments (see below) and then use $ jekyll --pygments +h2. Data + +The following is a reference of all the data that is made available to Liquid. + +h3. Site + + site.time + The current Time (when you run the jekyll command) + + site.posts + A reverse chronological list of Posts + +h3. Post + + post.title + The title of the Post + + post.url + The URL of the Post without the domain e.g. /2008/12/14/my-post.html + + post.date + The Date assigned to the Post + + post.id + An identifier unique to the Post (useful in RSS feeds) + + post.content + The content of the Post + + post.related_posts + A list of up to ten Posts that are related to this Post. For high + quality results be sure to run the jekyll command with --lsi option + h2. Filters, Tags, and Blocks In addition to the built-in Liquid filters, tags, and blocks, Jekyll provides some additional items that you can use in your site. From 0d18c6b16c59f8445a3456e223581b1c62c849ef Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 14:07:18 -0800 Subject: [PATCH 05/17] readme data tweaks --- README.textile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.textile b/README.textile index 15042a9d..35fd1b32 100644 --- a/README.textile +++ b/README.textile @@ -76,20 +76,22 @@ h3. Post The title of the Post post.url - The URL of the Post without the domain e.g. /2008/12/14/my-post.html + The URL of the Post without the domain + e.g. /2008/12/14/my-post.html post.date The Date assigned to the Post post.id An identifier unique to the Post (useful in RSS feeds) + e.g. /2008/12/14/my-post post.content The content of the Post post.related_posts - A list of up to ten Posts that are related to this Post. For high - quality results be sure to run the jekyll command with --lsi option + A list of up to ten Posts that are related to this Post. For high quality + results be sure to run the jekyll command with the --lsi option h2. Filters, Tags, and Blocks From 09976686e71abf7aae4e7d702742f82493e94b35 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 14:07:40 -0800 Subject: [PATCH 06/17] remove empty line --- lib/jekyll/post.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index ca2402a8..756df267 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -74,8 +74,7 @@ module Jekyll def permalink self.data && self.data['permalink'] end - - + # The generated relative url of this post # e.g. /2008/11/05/my-awesome-post.html # From 5c46fd6206e7232551596922b41e5dfab46b40c8 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 14:20:37 -0800 Subject: [PATCH 07/17] document yaml front matter --- README.textile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.textile b/README.textile index 35fd1b32..4bb3f3b8 100644 --- a/README.textile +++ b/README.textile @@ -93,6 +93,39 @@ h3. Post A list of up to ten Posts that are related to this Post. For high quality results be sure to run the jekyll command with the --lsi option +h2. YAML Front Matter + +Any files that contain a YAML front matter block will be processed by Jekyll as special files. The front matter takes the form of: + + --- + layout: post + title: Blogging Like a Hacker + --- + +Between the triple-dashed lines, you can set predefined variables (see below for a reference) or custom data of your own. + +h3. Predefined Global Variables + + layout + If set, this specifies the layout file to use. Use the layout name without + file extension. Layout files must be placed in the _layouts directory. + +h3. Predefined Post Variables + + permalink + If you need your processed URLs to be something other than the default + /year/month/day/title.html then you can set this variable and it will + be used as the final URL. + +h3. Custom Variables + +Any variables in the front matter that are not predefined are mixed into the +data that is sent to the Liquid templating engine during the conversion. For +instance, if you set a title, you can use that in your layout to +set the page title: + + {{ page.title }} + h2. Filters, Tags, and Blocks In addition to the built-in Liquid filters, tags, and blocks, Jekyll provides some additional items that you can use in your site. From 0c270cb1e5966bc3a918bb47de685a23672a59ec Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 14:48:57 -0800 Subject: [PATCH 08/17] better data docs --- README.textile | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/README.textile b/README.textile index 4bb3f3b8..6e1efa63 100644 --- a/README.textile +++ b/README.textile @@ -60,7 +60,26 @@ For static code highlighting, you can install Pygments (see below) and then use h2. Data -The following is a reference of all the data that is made available to Liquid. +Jekyll traverses your site looking for files to process. Any files with YAML front matter (see below) are subject to processing. For each of these files, Jekyll makes a variety of data available to the pages via the Liquid templating system. The following is a reference of the available data. + +h3. Global + + site + Sitewide information. + + page + For Posts, this is the union of the data in the YAML front matter and the + computed data (such as URL and date). For regular pages, this is just the + YAML front matter. + + content + In layout files, this contains the content of the subview(s). In Posts or + pages, this is undefined. + + related_posts + If the page being processed is a Post, this contains a list of up to ten + related Posts. For high quality results be sure to run the jekyll command + with the --lsi option. h3. Site @@ -89,10 +108,6 @@ h3. Post post.content The content of the Post - post.related_posts - A list of up to ten Posts that are related to this Post. For high quality - results be sure to run the jekyll command with the --lsi option - h2. YAML Front Matter Any files that contain a YAML front matter block will be processed by Jekyll as special files. The front matter takes the form of: From d48157cf33ac06b5a5466b75c3d759d09f7d5a38 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 14:58:03 -0800 Subject: [PATCH 09/17] move related_posts into site data --- README.textile | 10 +++++----- lib/jekyll/post.rb | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.textile b/README.textile index 6e1efa63..bc045bf6 100644 --- a/README.textile +++ b/README.textile @@ -76,11 +76,6 @@ h3. Global In layout files, this contains the content of the subview(s). In Posts or pages, this is undefined. - related_posts - If the page being processed is a Post, this contains a list of up to ten - related Posts. For high quality results be sure to run the jekyll command - with the --lsi option. - h3. Site site.time @@ -89,6 +84,11 @@ h3. Site site.posts A reverse chronological list of Posts + site.related_posts + If the page being processed is a Post, this contains a list of up to ten + related Posts. For high quality results be sure to run the jekyll command + with the --lsi option. + h3. Post post.title diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 756df267..caca9354 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -121,8 +121,8 @@ module Jekyll def add_layout(layouts, site_payload) # construct post payload related = related_posts(site_payload["site"]["posts"]) - payload = {"page" => self.to_liquid.merge(self.data), "related_posts" => related} - do_layout(payload, layouts, site_payload) + payload = {"page" => self.to_liquid.merge(self.data)} + do_layout(payload, layouts, site_payload.merge({"site" => {"related_posts" => related}})) end # Write the generated post file to the destination directory. From 043fb15ca90a1c9cd1adc879f92495cb36a85abb Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 15:02:17 -0800 Subject: [PATCH 10/17] readme clarifications --- README.textile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.textile b/README.textile index bc045bf6..9ac58e73 100644 --- a/README.textile +++ b/README.textile @@ -79,34 +79,35 @@ h3. Global h3. Site site.time - The current Time (when you run the jekyll command) + The current Time (when you run the jekyll command). site.posts - A reverse chronological list of Posts + A reverse chronological list of all Posts. site.related_posts If the page being processed is a Post, this contains a list of up to ten - related Posts. For high quality results be sure to run the jekyll command - with the --lsi option. + related Posts. By default, these are low quality but fast to compute. For + high quality but slow to compute results, run the jekyll command with the + --lsi (latent semantic indexing) option. h3. Post post.title - The title of the Post + The title of the Post. post.url - The URL of the Post without the domain + The URL of the Post without the domain. e.g. /2008/12/14/my-post.html post.date - The Date assigned to the Post + The Date assigned to the Post. post.id - An identifier unique to the Post (useful in RSS feeds) + An identifier unique to the Post (useful in RSS feeds). e.g. /2008/12/14/my-post post.content - The content of the Post + The content of the Post. h2. YAML Front Matter From 694cea607085ca2eba4fe7b3f23a201c3871350b Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 15:03:38 -0800 Subject: [PATCH 11/17] update history with related_posts change --- History.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.txt b/History.txt index 999698a7..7662db4a 100644 --- a/History.txt +++ b/History.txt @@ -1,3 +1,7 @@ +== + * Major Changes + * related_posts is now found in site.related_posts + == 0.1.6 / 2008-12-13 * Major Features * Include files in _includes with {% include x.textile %} From 8fab783c2da20af628aa0c7e7ef8aa1e4d9b915c Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 15:06:12 -0800 Subject: [PATCH 12/17] clarify front matter docs --- README.textile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.textile b/README.textile index 9ac58e73..773ae39b 100644 --- a/README.textile +++ b/README.textile @@ -111,7 +111,7 @@ h3. Post h2. YAML Front Matter -Any files that contain a YAML front matter block will be processed by Jekyll as special files. The front matter takes the form of: +Any files that contain a YAML front matter block will be processed by Jekyll as special files. The front matter must be the first thing in the file and takes the form of: --- layout: post @@ -122,9 +122,9 @@ Between the triple-dashed lines, you can set predefined variables (see below for h3. Predefined Global Variables - layout - If set, this specifies the layout file to use. Use the layout name without - file extension. Layout files must be placed in the _layouts directory. + layout If set, this specifies the layout file to use. Use the layout file + name without file extension. Layout files must be placed in the + _layouts directory. h3. Predefined Post Variables From 3a21a0b21b3b03e6f2577b1ca19edf7b9d42025c Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 15:07:17 -0800 Subject: [PATCH 13/17] break long lines in readme --- README.textile | 102 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 83 insertions(+), 19 deletions(-) diff --git a/README.textile b/README.textile index 773ae39b..bb3508d8 100644 --- a/README.textile +++ b/README.textile @@ -1,27 +1,77 @@ h1. Jekyll -Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. Visit "http://tom.preston-werner.com":http://tom.preston-werner.com to see an example of a Jekyll generated blog. +Jekyll is a simple, blog aware, static site generator. It takes a template +directory (representing the raw form of a website), runs it through Textile or +Markdown and Liquid converters, and spits out a complete, static website +suitable for serving with Apache or your favorite web server. Visit +"http://tom.preston-werner.com":http://tom.preston-werner.com to see an +example of a Jekyll generated blog. -To understand how this all works, open up my "TPW":http://github.com/mojombo/tpw repo in a new browser window. I'll be referencing the code there. +To understand how this all works, open up my +"TPW":http://github.com/mojombo/tpw repo in a new browser window. I'll be +referencing the code there. -Take a look at "index.html":http://github.com/mojombo/tpw/tree/master/index.html. This file represents the homepage of the site. At the top of the file is a chunk of YAML that contains metadata about the file. This data tells Jekyll what layout to give the file, what the page's title should be, etc. In this case, I specify that the "default" template should be used. You can find the layout files in the "_layouts":http://github.com/mojombo/tpw/tree/master/_layouts directory. If you open "default.html":http://github.com/mojombo/tpw/tree/master/_layouts/default.html you can see that the homepage is constructed by wrapping index.html with this layout. +Take a look at +"index.html":http://github.com/mojombo/tpw/tree/master/index.html. This file +represents the homepage of the site. At the top of the file is a chunk of YAML +that contains metadata about the file. This data tells Jekyll what layout to +give the file, what the page's title should be, etc. In this case, I specify +that the "default" template should be used. You can find the layout files in +the "_layouts":http://github.com/mojombo/tpw/tree/master/_layouts directory. +If you open +"default.html":http://github.com/mojombo/tpw/tree/master/_layouts/default.html +you can see that the homepage is constructed by wrapping index.html with this +layout. -You'll also notice Liquid templating code in these files. "Liquid":http://www.liquidmarkup.org/ is a simple, extensible templating language that makes it easy to embed data in your templates. For my homepage I wanted to have a list of all my blog posts. Jekyll hands me a Hash containing various data about my site. A reverse chronological list of all my blog posts can be found in site.posts. Each post, in turn, contains various fields such as title and date. +You'll also notice Liquid templating code in these files. +"Liquid":http://www.liquidmarkup.org/ is a simple, extensible templating +language that makes it easy to embed data in your templates. For my homepage I +wanted to have a list of all my blog posts. Jekyll hands me a Hash containing +various data about my site. A reverse chronological list of all my blog posts +can be found in site.posts. Each post, in turn, contains various +fields such as title and date. -Jekyll gets the list of blog posts by parsing the files in the "_posts":http://github.com/mojombo/tpw/tree/master/_posts directory. Each post's filename contains the publishing date and slug (what shows up in the URL) that the final HTML file should have. Open up the file corresponding to a blog post: "2008-11-17-blogging-like-a-hacker.textile":http://github.com/mojombo/tpw/tree/master/_posts/2008-11-17-blogging-like-a-hacker.textile. GitHub renders textile files by default, so to better understand the file, click on the "raw":http://github.com/mojombo/tpw/tree/master/_posts/2008-11-17-blogging-like-a-hacker.textile?raw=true view to see the original file. Here I've specified the post layout. If you look at that file you'll see an example of a nested layout. Layouts can contain other layouts allowing you a great deal of flexibility in how pages are assembled. In my case I use a nested layout in order to show related posts for each blog entry. The YAML also specifies the post's title which is then embedded in the post's body via Liquid. +Jekyll gets the list of blog posts by parsing the files in the +"_posts":http://github.com/mojombo/tpw/tree/master/_posts directory. Each +post's filename contains the publishing date and slug (what shows up in the +URL) that the final HTML file should have. Open up the file corresponding to a +blog post: +"2008-11-17-blogging-like-a-hacker.textile":http://github.com/mojombo/tpw/tree/master/_posts/2008-11-17-blogging-like-a-hacker.textile. +GitHub renders textile files by default, so to better understand the file, +click on the +"raw":http://github.com/mojombo/tpw/tree/master/_posts/2008-11-17-blogging-like-a-hacker.textile?raw=true +view to see the original file. Here I've specified the post +layout. If you look at that file you'll see an example of a nested layout. +Layouts can contain other layouts allowing you a great deal of flexibility in +how pages are assembled. In my case I use a nested layout in order to show +related posts for each blog entry. The YAML also specifies the post's title +which is then embedded in the post's body via Liquid. -Posts are handled in a special way by Jekyll. The date you specify in the filename is used to construct the URL in the generated site. The example post, for instance, ends up at http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html. +Posts are handled in a special way by Jekyll. The date you specify in the +filename is used to construct the URL in the generated site. The example post, +for instance, ends up at +http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html. -Files that do not reside in directories prefixed with an underscore are mirrored into a corresponding directory structure in the generated site. If a file does not have a YAML preface, it is not run through the Liquid interpreter. Binary files are copied over unmodified. +Files that do not reside in directories prefixed with an underscore are +mirrored into a corresponding directory structure in the generated site. If a +file does not have a YAML preface, it is not run through the Liquid +interpreter. Binary files are copied over unmodified. -Jekyll is still a very young project. I've only developed the exact functionality that I've needed. As time goes on I'd like to see the project mature and support additional features. If you end up using Jekyll for your own blog, drop me a line and let me know what you'd like to see in future versions. Better yet, fork the project over at GitHub and hack in the features yourself! +Jekyll is still a very young project. I've only developed the exact +functionality that I've needed. As time goes on I'd like to see the project +mature and support additional features. If you end up using Jekyll for your +own blog, drop me a line and let me know what you'd like to see in future +versions. Better yet, fork the project over at GitHub and hack in the features +yourself! h2. Example Proto-Site My own personal site/blog is generated with Jekyll. -The proto-site repo ("http://github.com/mojombo/tpw":http://github.com/mojombo/tpw) -is converted into the actual site ("http://tom.preston-werner.com/":http://tom.preston-werner.com) +The proto-site repo +("http://github.com/mojombo/tpw":http://github.com/mojombo/tpw) is converted +into the actual site +("http://tom.preston-werner.com/":http://tom.preston-werner.com) h2. Install @@ -34,7 +84,8 @@ h2. Run $ cd /path/to/proto/site $ jekyll -This will generate the site and place it in /path/to/proto/site/_site. If you'd like the generated site placed somewhere else: +This will generate the site and place it in /path/to/proto/site/_site. If +you'd like the generated site placed somewhere else: $ jekyll /path/to/place/generated/site @@ -44,7 +95,8 @@ And if you don't want to be in the proto site root to run Jekyll: h2. Run Options -There is an autobuild feature that will regenerate your site if any of the files change. The autobuild feature can be used on any of the invocations: +There is an autobuild feature that will regenerate your site if any of the +files change. The autobuild feature can be used on any of the invocations: $ jekyll --auto @@ -54,13 +106,18 @@ enable it (it may take some time to run if you have many posts): $ jekyll --lsi -For static code highlighting, you can install Pygments (see below) and then use that to make your code blocks look pretty. To activate Pygments support during the conversion: +For static code highlighting, you can install Pygments (see below) and then +use that to make your code blocks look pretty. To activate Pygments support +during the conversion: $ jekyll --pygments h2. Data -Jekyll traverses your site looking for files to process. Any files with YAML front matter (see below) are subject to processing. For each of these files, Jekyll makes a variety of data available to the pages via the Liquid templating system. The following is a reference of the available data. +Jekyll traverses your site looking for files to process. Any files with YAML +front matter (see below) are subject to processing. For each of these files, +Jekyll makes a variety of data available to the pages via the Liquid +templating system. The following is a reference of the available data. h3. Global @@ -111,14 +168,17 @@ h3. Post h2. YAML Front Matter -Any files that contain a YAML front matter block will be processed by Jekyll as special files. The front matter must be the first thing in the file and takes the form of: +Any files that contain a YAML front matter block will be processed by Jekyll +as special files. The front matter must be the first thing in the file and +takes the form of: --- layout: post title: Blogging Like a Hacker --- -Between the triple-dashed lines, you can set predefined variables (see below for a reference) or custom data of your own. +Between the triple-dashed lines, you can set predefined variables (see below +for a reference) or custom data of your own. h3. Predefined Global Variables @@ -144,7 +204,8 @@ set the page title: h2. Filters, Tags, and Blocks -In addition to the built-in Liquid filters, tags, and blocks, Jekyll provides some additional items that you can use in your site. +In addition to the built-in Liquid filters, tags, and blocks, Jekyll provides +some additional items that you can use in your site. h3. Date to XML Schema (Filter) @@ -178,14 +239,17 @@ If you have small page fragments that you wish to include in multiple places on
{% include sig.textile %}
-Jekyll expects all include files to be placed in an _includes directory at the root of your source dir. So this will embed the contents of /path/to/proto/site/_includes/sig.textile into the calling file. +Jekyll expects all include files to be placed in an _includes +directory at the root of your source dir. So this will embed the contents of +/path/to/proto/site/_includes/sig.textile into the calling file. h3. Code Highlighting (Block) Jekyll has built in support for syntax highlighting of over "100 languages":http://pygments.org/languages/ via "Pygments":http://pygments.org/. In order to take advantage of this you'll need to have Pygments installed, and -the pygmentize binary must be in your path. When you run Jekyll, make sure you run it with Pygments support: +the pygmentize binary must be in your path. When you run Jekyll, make sure you +run it with Pygments support: $ jekyll --pygments From 8bea61eb14839837df34d88be0a1bfe3aca28f61 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 15:09:01 -0800 Subject: [PATCH 14/17] fix formatting --- README.textile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.textile b/README.textile index bb3508d8..5876375b 100644 --- a/README.textile +++ b/README.textile @@ -172,10 +172,12 @@ Any files that contain a YAML front matter block will be processed by Jekyll as special files. The front matter must be the first thing in the file and takes the form of: +
   ---
   layout: post
   title: Blogging Like a Hacker
   ---
+
Between the triple-dashed lines, you can set predefined variables (see below for a reference) or custom data of your own. @@ -200,7 +202,7 @@ data that is sent to the Liquid templating engine during the conversion. For instance, if you set a title, you can use that in your layout to set the page title: - {{ page.title }} + <title>{{ page.title }}</title> h2. Filters, Tags, and Blocks From 7716e64e226288d071ac3dca57d37f19d0ad4fc1 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 15:09:58 -0800 Subject: [PATCH 15/17] fix formatting again --- README.textile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.textile b/README.textile index 5876375b..9d2458bb 100644 --- a/README.textile +++ b/README.textile @@ -173,10 +173,10 @@ as special files. The front matter must be the first thing in the file and takes the form of:
-  ---
-  layout: post
-  title: Blogging Like a Hacker
-  ---
+---
+layout: post
+title: Blogging Like a Hacker
+---
 
Between the triple-dashed lines, you can set predefined variables (see below @@ -202,7 +202,9 @@ data that is sent to the Liquid templating engine during the conversion. For instance, if you set a title, you can use that in your layout to set the page title: - <title>{{ page.title }}</title> +
+{{ page.title }}
+
h2. Filters, Tags, and Blocks From 516afee8a9fcbac81e0a13e2921459cbb9f2858e Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 15:10:51 -0800 Subject: [PATCH 16/17] fix formatting one more time --- README.textile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.textile b/README.textile index 9d2458bb..7e2f4107 100644 --- a/README.textile +++ b/README.textile @@ -184,9 +184,10 @@ for a reference) or custom data of your own. h3. Predefined Global Variables - layout If set, this specifies the layout file to use. Use the layout file - name without file extension. Layout files must be placed in the - _layouts directory. + layout + If set, this specifies the layout file to use. Use the layout file + name without file extension. Layout files must be placed in the + _layouts directory. h3. Predefined Post Variables From de2959b8ea78dc610f21080914ed693a9ad2fbfb Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 14 Dec 2008 15:16:16 -0800 Subject: [PATCH 17/17] up to 0.2.0 --- History.txt | 2 +- jekyll.gemspec | 4 ++-- lib/jekyll.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/History.txt b/History.txt index 7662db4a..a0326f16 100644 --- a/History.txt +++ b/History.txt @@ -1,4 +1,4 @@ -== +== 0.2.0 / 2008-12-14 * Major Changes * related_posts is now found in site.related_posts diff --git a/jekyll.gemspec b/jekyll.gemspec index e986398d..61258d71 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -1,10 +1,10 @@ Gem::Specification.new do |s| s.name = %q{jekyll} - s.version = "0.1.6" + s.version = "0.2.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Tom Preston-Werner"] - s.date = %q{2008-12-13} + s.date = %q{2008-12-14} s.default_executable = %q{jekyll} s.email = ["tom@mojombo.com"] s.executables = ["jekyll"] diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 1e2d0bae..2ab53cff 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -31,7 +31,7 @@ require 'jekyll/tags/include' require 'jekyll/albino' module Jekyll - VERSION = '0.1.6' + VERSION = '0.2.0' class << self attr_accessor :source, :dest, :lsi, :pygments