From 9fc89482b3dc0b8b8b7af9b81601f959e065237d Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 11 Jan 2013 23:50:13 -0800 Subject: [PATCH 01/11] Using build and serve sub-commands in docs --- site/_posts/2012-07-01-deployment-methods.md | 2 +- site/_posts/2012-07-01-extras.md | 2 +- site/_posts/2012-07-01-home.md | 2 +- site/_posts/2012-07-01-troubleshooting.md | 2 +- site/_posts/2012-07-01-usage.md | 19 +++++++++++-------- site/index.html | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/site/_posts/2012-07-01-deployment-methods.md b/site/_posts/2012-07-01-deployment-methods.md index 7716e5f8..80b55ae3 100644 --- a/site/_posts/2012-07-01-deployment-methods.md +++ b/site/_posts/2012-07-01-deployment-methods.md @@ -53,7 +53,7 @@ TMP_GIT_CLONE=$HOME/tmp/myrepo PUBLIC_WWW=/var/www/myrepo git clone $GIT_REPO $TMP_GIT_CLONE -jekyll --no-auto $TMP_GIT_CLONE $PUBLIC_WWW +jekyll build $TMP_GIT_CLONE $PUBLIC_WWW rm -Rf $TMP_GIT_CLONE exit {% endhighlight %} diff --git a/site/_posts/2012-07-01-extras.md b/site/_posts/2012-07-01-extras.md index 1af24d10..7bbff0b9 100644 --- a/site/_posts/2012-07-01-extras.md +++ b/site/_posts/2012-07-01-extras.md @@ -91,7 +91,7 @@ sudo gem install rdiscount And then run Jekyll with the following option: {% highlight bash %} -jekyll --rdiscount +jekyll build --markdown rdiscount {% endhighlight %} Or, specify RDiscount as the markdown engine in your `_config.yml` file to have Jekyll run with that option by default (so you don’t have to specify the flag every time). diff --git a/site/_posts/2012-07-01-home.md b/site/_posts/2012-07-01-home.md index 9c27eeef..34de7bb1 100644 --- a/site/_posts/2012-07-01-home.md +++ b/site/_posts/2012-07-01-home.md @@ -19,7 +19,7 @@ For the impatient, here's how to get Jekyll up and running. ~ $ mkdir -p my/new/site ~ $ cd my/new/site ~ $ vim index.html -~/my/new/site $ jekyll --server +~/my/new/site $ jekyll serve # => Now browse to http://localhost:4000 {% endhighlight %} diff --git a/site/_posts/2012-07-01-troubleshooting.md b/site/_posts/2012-07-01-troubleshooting.md index e6a592f2..08dac8e8 100644 --- a/site/_posts/2012-07-01-troubleshooting.md +++ b/site/_posts/2012-07-01-troubleshooting.md @@ -50,7 +50,7 @@ On Debian or Ubuntu, you may need to add /var/lib/gems/1.8/bin/ to your path in ## Base-URL Problems -If you are using base-url option like `jekyll --server --base-url '/blog'` then make sure that you access the site at `http://localhost:4000/blog/index.html`. Just accessing `http://localhost:4000/blog` will not work. +If you are using base-url option like `jekyll serve --baseurl '/blog'` then make sure that you access the site at `http://localhost:4000/blog/index.html`. Just accessing `http://localhost:4000/blog` will not work. ## Configuration problems diff --git a/site/_posts/2012-07-01-usage.md b/site/_posts/2012-07-01-usage.md index c1cfa5b1..ae1b07e1 100644 --- a/site/_posts/2012-07-01-usage.md +++ b/site/_posts/2012-07-01-usage.md @@ -8,28 +8,31 @@ next_section: structure The Jekyll gem makes a `jekyll` executable available to you in your Terminal window. You can use this command in a number of ways: {% highlight bash %} -jekyll +jekyll build #=> The current folder will get generated into ./_site -jekyll +jekyll build --destination #=> The current folder will get generated into -jekyll +jekyll build --source --destination #=> The folder will get generated into +jekyll build --watch +#=> The current folder will get generated into ./_site, +# and watch for changes and regenerate automatically. {% endhighlight %} Jekyll also comes with a built-in development server that will allow you to preview what the generated site will look like in your browser locally. {% highlight bash %} -jekyll --server +jekyll serve #=> A development server will run at http://localhost:4000/ -jekyll --server --auto +jekyll serve --watch #=> As above, but watch for changes and regenerate automatically too. {% endhighlight %} -These are just some of the many [configuration options](../configuration) available. All configuration options can either be specified as flags on the command line, or alternatively (and more commonly) they can be specified in a `_config.yml` file at the root of the source directory. Jekyll will automatically configuration options from this file when run, so placing the following two lines in the configuration file will mean that running `jekyll` would be equivalent to running `jekyll --server --auto`: +These are just some of the many [configuration options](../configuration) available. All configuration options can either be specified as flags on the command line, or alternatively (and more commonly) they can be specified in a `_config.yml` file at the root of the source directory. Jekyll will automatically configuration options from this file when run, so placing the following one line in the configuration file will mean that running `jekyll build` or `jekyll serve` would be equivalent to running `jekyll [build|serve] --source _source --destination _deploy`: {% highlight yaml %} -auto: true -server: true +source: _source +destination: _deploy {% endhighlight %} For more about the possible configuration options, see the [configuration](../configuration) page. diff --git a/site/index.html b/site/index.html index 86711cd8..ee30456d 100644 --- a/site/index.html +++ b/site/index.html @@ -54,7 +54,7 @@ overview: true

~/my/awesome/site $ - jekyll --server + jekyll serve

# => Now browse to http://localhost:4000 From 39b159c258a890e5b52931c33d3971381cbced04 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 11 Jan 2013 23:50:36 -0800 Subject: [PATCH 02/11] Return of the "sites" page - for learning purposes --- site/_includes/docs_contents.html | 3 +++ site/_posts/2012-07-01-sites.md | 25 +++++++++++++++++++++++++ site/_posts/2012-07-01-structure.md | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 site/_posts/2012-07-01-sites.md diff --git a/site/_includes/docs_contents.html b/site/_includes/docs_contents.html index ad3f3e16..7e7637f3 100644 --- a/site/_includes/docs_contents.html +++ b/site/_includes/docs_contents.html @@ -71,6 +71,9 @@

  • Troubleshooting
  • +
  • + Sites using Jekyll +
  • Resources
  • diff --git a/site/_posts/2012-07-01-sites.md b/site/_posts/2012-07-01-sites.md new file mode 100644 index 00000000..b24aba41 --- /dev/null +++ b/site/_posts/2012-07-01-sites.md @@ -0,0 +1,25 @@ +--- +layout: docs +title: Sites using Jekyll +prev_section: troubleshooting +next_section: resources +--- + +It’s interesting to see what designs and features others have come up +with. Below are three Jekyll-powered blogs which were hand-picked for +learning purposes. + +- [Tom Preston-Werner](http://tom.preston-werner.com/) + ([source](http://github.com/mojombo/mojombo.github.com)) +- [Nick Quaranto](http://quaran.to/) + ([source](https://github.com/qrush/qrush.github.com)) +- [Parker Moore](http://www.parkermoore.de) + ([source](https://github.com/parkr/blogsource)) +- [Roger Chapman](http://rogchap.com/) + ([source](https://github.com/rogchap/rogchap.github.com)) +- [GitHub Official Teaching Materials](http://teach.github.com) + ([source](https://github.com/github/teach.github.com)) +- [Rasmus Andersson](http://rsms.me/) + ([source](https://github.com/rsms/rsms.github.com)) +- [Scott Chacon](http://schacon.github.com) + ([source](https://github.com/schacon/schacon.github.com)) diff --git a/site/_posts/2012-07-01-structure.md b/site/_posts/2012-07-01-structure.md index 78212f03..87362b44 100644 --- a/site/_posts/2012-07-01-structure.md +++ b/site/_posts/2012-07-01-structure.md @@ -88,7 +88,7 @@ An overview of what each of these does:

    Other Files/Folders

    -

    Every other directory and file except for those listed above—such as css and images folders, favicon.ico files, and so forth—will be transferred over verbatim to the generated site. There's plenty of sites already using Jekyll if you're curious as to how they're laid out.

    +

    Every other directory and file except for those listed above—such as css and images folders, favicon.ico files, and so forth—will be transferred over verbatim to the generated site. There's plenty of sites already using Jekyll if you're curious as to how they're laid out.

    From 64cbaa1d85f87c4feec22c2c7c129974e0495fed Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 11 Jan 2013 23:51:06 -0800 Subject: [PATCH 03/11] Configuration docs updated with new structure --- site/_posts/2012-07-01-configuration.md | 301 +++++++++++++----------- 1 file changed, 164 insertions(+), 137 deletions(-) diff --git a/site/_posts/2012-07-01-configuration.md b/site/_posts/2012-07-01-configuration.md index a942914b..6a66e14c 100644 --- a/site/_posts/2012-07-01-configuration.md +++ b/site/_posts/2012-07-01-configuration.md @@ -9,6 +9,8 @@ Jekyll allows you to concoct your sites in any way you can dream up, and it’s ## Configuration Settings +### Global Configuration + The table below lists the available settings for Jekyll, and the various options (specifed in the configuration file) and flags (specified on the command-line) that control them. @@ -19,6 +21,26 @@ The table below lists the available settings for Jekyll, and the various + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    +

    Site Source

    +

    Changes the directory where Jekyll will look to transform files

    +
    +

    source: [string]

    +

    --source [source]

    +
    +

    Site Destination

    +

    Changes the directory where Jekyll will write files to

    +
    +

    destination: [string]

    +

    --destination

    +

    Safe

    @@ -29,140 +51,6 @@ The table below lists the available settings for Jekyll, and the various --safe

    -

    Regeneration

    -

    Enables or disables Jekyll from recreating the site when files are modified.

    -
    -

    auto: [boolean]

    -

    --auto

    -

    --no-auto

    -
    -

    Local Server

    -

    Fires up a server that will host your _site directory

    -
    -

    server: [boolean]

    -

    --server

    -
    -

    Local Server Port

    -

    Changes the port that the Jekyll server will run on

    -
    -

    server_port: [integer]

    -

    --server [port]

    -
    -

    Base URL

    -

    Serve website from a given base URL

    -
    -

    baseurl: [BASE_URL]

    -

    --base-url [url]

    -
    -

    URL

    -

    Sets site.url, useful for environment switching

    -
    -

    url: [URL]

    -

    --url [URL]

    -
    -

    Site Destination

    -

    Changes the directory where Jekyll will write files to

    -
    -

    destination: [dir]

    -

    jekyll [dest]

    -
    -

    Site Source

    -

    Changes the directory where Jekyll will look to transform files

    -
    -

    source: [dir]

    -

    jekyll [source] [dest]

    -
    -

    Markdown

    -

    Uses RDiscount or [engine] instead of Maruku.

    -
    -

    markdown: [engine]

    -

    --rdiscount

    -

    --kramdown

    -

    --redcarpet

    -
    -

    Pygments

    -

    Enables highlight tag with Pygments.

    -
    -

    pygments: [boolean]

    -

    --pygments

    -
    -

    Future

    -

    Publishes posts with a future date

    -
    -

    future: [boolean]

    -

    --no-future

    -

    --future

    -
    -

    LSI

    -

    Produces an index for related posts.

    -
    -

    lsi: [boolean]

    -

    --lsi

    -
    -

    Permalink

    -

    Controls the URLs that posts are generated with. Please refer to the Permalinks page for more info.

    -
    -

    permalink: [style]

    -

    --permalink=[style]

    -
    -

    Pagination

    -

    Splits your posts up over multiple subdirectories called "page2", "page3", ... "pageN"

    -
    -

    paginate: [per_page]

    -

    --paginate [per_page]

    -

    Exclude

    @@ -181,6 +69,98 @@ The table below lists the available settings for Jekyll, and the various include: [dir1, file1, dir2]

    + +### Configuration for "build" Sub-Command + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    SettingOptions and Flags
    +

    Regeneration

    +

    Enables auto-regeneration of the site when files are modified. Off by default.

    +
    +

    --watch

    +
    +

    URL

    +

    Sets site.url, useful for environment switching

    +
    +

    url: [URL]

    +

    --url [URL]

    +
    +

    Markdown

    +

    Uses RDiscount or [engine] instead of Maruku.

    +
    +

    markdown: [engine]

    +

    --markdown [rdiscount|kramdown|redcarpet]

    +
    +

    Pygments

    +

    Enables highlight tag with Pygments.

    +
    +

    pygments: [boolean]

    +

    --pygments

    +
    +

    Future

    +

    Publishes posts with a future date

    +
    +

    future: [boolean]

    +

    --future

    +
    +

    LSI

    +

    Produces an index for related posts.

    +
    +

    lsi: [boolean]

    +

    --lsi

    +
    +

    Permalink

    +

    Controls the URLs that posts are generated with. Please refer to the Permalinks page for more info.

    +
    +

    permalink: [style]

    +

    --permalink [style]

    +
    +

    Pagination

    +

    Splits your posts up over multiple subdirectories called "page2", "page3", ... "pageN"

    +
    +

    paginate: [per_page]

    +

    --paginate [per_page]

    +

    Limit Posts

    @@ -188,10 +168,56 @@ The table below lists the available settings for Jekyll, and the various

    limit_posts: [max_posts]

    -

    --limit_posts=[max_posts]

    +

    --limit_posts [max_posts]

    +### Configuration for "serve" Sub-Command + +In addition to the options below, the `serve` sub-command can accept any of the options +for the `build` sub-command, which are then applied to the site build which occurs right +before your site is served. + + + + + + + + + + + + + + + + + + + + +
    SettingOptions and Flags
    +

    Local Server Port

    +

    Changes the port that the Jekyll server will run on

    +
    +

    port: [integer]

    +

    --port [port]

    +
    +

    Local Server Hostname

    +

    Changes the hostname that the Jekyll server will run on

    +
    +

    host: [string]

    +

    --host [hostname]

    +
    +

    Base URL

    +

    Serve website from a given base URL

    +
    +

    baseurl: [BASE_URL]

    +

    --baseurl [url]

    +
    @@ -206,9 +232,10 @@ Jekyll runs with the following configuration options by default. Unless alternat {% highlight yaml %} safe: false -auto: false +watch: false server: false -server_port: 4000 +host: 0.0.0.0 +port: 4000 baseurl: / url: http://localhost:4000 From 5db1bba6fd33490faac6c2907062d7da996fd3cf Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 11 Jan 2013 23:51:22 -0800 Subject: [PATCH 04/11] auto => watch --- site/_posts/2012-07-01-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/_posts/2012-07-01-variables.md b/site/_posts/2012-07-01-variables.md index b04c14f5..01091474 100644 --- a/site/_posts/2012-07-01-variables.md +++ b/site/_posts/2012-07-01-variables.md @@ -68,7 +68,7 @@ Jekyll traverses your site looking for files to process. Any files with [YAML Fr

    site.[CONFIGURATION_DATA]

    -

    All variables set in your _config.yml are available through the site variable. For example, if you have url: http://mysite.com in your configuration file, then in your posts and pages it can be accessed using {{ "{{ site.url " }}}}. Jekyll does not parse changes to _config.yml in auto mode, you have to restart Jekyll to see changes to variables.

    +

    All variables set in your _config.yml are available through the site variable. For example, if you have url: http://mysite.com in your configuration file, then in your posts and pages it can be accessed using {{ "{{ site.url " }}}}. Jekyll does not parse changes to _config.yml in watch mode, you have to restart Jekyll to see changes to variables.

    From 42fa1046db418143772147edf79a6a0875c5a69b Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 11 Jan 2013 23:51:32 -0800 Subject: [PATCH 05/11] Using internal links for homepage --- site/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/index.html b/site/index.html index ee30456d..c0a35828 100644 --- a/site/index.html +++ b/site/index.html @@ -16,19 +16,19 @@ overview: true

    No more databases, comment moderation, or pesky updates to install—just your content.

    - How Jekyll works → + How Jekyll works →

    Static

    Markdown (or Textile), Liquid, HTML & CSS go in. Static sites come out ready for deployment.

    - Jekyll template guide → + Jekyll template guide →

    Blog-aware

    Permalinks, categories, pages, posts, and custom layouts are all first-class citizens here.

    - Migrate your blog → + Migrate your blog →
    From 4bb5158b094879b929c064fa667962da468202d2 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 12 Jan 2013 15:34:05 -0800 Subject: [PATCH 06/11] New sub-titles for sub-command options table --- site/_posts/2012-07-01-configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/_posts/2012-07-01-configuration.md b/site/_posts/2012-07-01-configuration.md index 6a66e14c..7fcb34fe 100644 --- a/site/_posts/2012-07-01-configuration.md +++ b/site/_posts/2012-07-01-configuration.md @@ -72,7 +72,7 @@ The table below lists the available settings for Jekyll, and the various -### Configuration for "build" Sub-Command +### Build Command Options @@ -174,7 +174,7 @@ The table below lists the available settings for Jekyll, and the various
    -### Configuration for "serve" Sub-Command +### Serve Command Options In addition to the options below, the `serve` sub-command can accept any of the options for the `build` sub-command, which are then applied to the site build which occurs right From 078972de4b27ad6541834b29f152dc84a18f44ff Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 12 Jan 2013 15:35:21 -0800 Subject: [PATCH 07/11] Remove Octopress site from list of Jekyll-powered Sites --- site/_posts/2012-07-01-sites.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/site/_posts/2012-07-01-sites.md b/site/_posts/2012-07-01-sites.md index b24aba41..715cea1d 100644 --- a/site/_posts/2012-07-01-sites.md +++ b/site/_posts/2012-07-01-sites.md @@ -13,8 +13,6 @@ learning purposes. ([source](http://github.com/mojombo/mojombo.github.com)) - [Nick Quaranto](http://quaran.to/) ([source](https://github.com/qrush/qrush.github.com)) -- [Parker Moore](http://www.parkermoore.de) - ([source](https://github.com/parkr/blogsource)) - [Roger Chapman](http://rogchap.com/) ([source](https://github.com/rogchap/rogchap.github.com)) - [GitHub Official Teaching Materials](http://teach.github.com) From 45f10a22da8c2d2631c5669a2dcd4314a517b8c6 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 12 Jan 2013 15:36:11 -0800 Subject: [PATCH 08/11] Update number of Jekyll-powered blogs on Sites page --- site/_posts/2012-07-01-sites.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/_posts/2012-07-01-sites.md b/site/_posts/2012-07-01-sites.md index 715cea1d..1cd971c4 100644 --- a/site/_posts/2012-07-01-sites.md +++ b/site/_posts/2012-07-01-sites.md @@ -6,7 +6,7 @@ next_section: resources --- It’s interesting to see what designs and features others have come up -with. Below are three Jekyll-powered blogs which were hand-picked for +with. Below are six Jekyll-powered blogs which were hand-picked for learning purposes. - [Tom Preston-Werner](http://tom.preston-werner.com/) From 070f5111e1802186ac7b3ec6bded884dbb3fa5a2 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 15 Jan 2013 14:44:06 -0800 Subject: [PATCH 09/11] A link to the sites page on the wiki (in addition to this curated list) --- site/_posts/2012-07-01-sites.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/_posts/2012-07-01-sites.md b/site/_posts/2012-07-01-sites.md index 1cd971c4..82142aba 100644 --- a/site/_posts/2012-07-01-sites.md +++ b/site/_posts/2012-07-01-sites.md @@ -21,3 +21,8 @@ learning purposes. ([source](https://github.com/rsms/rsms.github.com)) - [Scott Chacon](http://schacon.github.com) ([source](https://github.com/schacon/schacon.github.com)) + +If you would like to explore more examples, you can find a list of sites +and their sources on the ["Sites" page in the Jekyll wiki][jekyll-sites]. + +[jekyll-sites]: https://github.com/mojombo/jekyll/wiki/Sites From c0a6e1e5a25b3e05a51b339b9ae2ad8e39e5bed1 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 15 Jan 2013 14:56:04 -0800 Subject: [PATCH 10/11] Changed 'six' to 'some' on Sites page --- site/_posts/2012-07-01-sites.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/_posts/2012-07-01-sites.md b/site/_posts/2012-07-01-sites.md index 82142aba..f28c0280 100644 --- a/site/_posts/2012-07-01-sites.md +++ b/site/_posts/2012-07-01-sites.md @@ -6,7 +6,7 @@ next_section: resources --- It’s interesting to see what designs and features others have come up -with. Below are six Jekyll-powered blogs which were hand-picked for +with. Below are some Jekyll-powered blogs which were hand-picked for learning purposes. - [Tom Preston-Werner](http://tom.preston-werner.com/) From a017f36d4b669e2f09399f44a14eb43fb847aad2 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 15 Jan 2013 15:03:52 -0800 Subject: [PATCH 11/11] Added description to History file --- History.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.txt b/History.txt index 260c2661..094676f5 100644 --- a/History.txt +++ b/History.txt @@ -1,4 +1,6 @@ == HEAD + * Major Enhancements + * Refactored jekyll commands into subcommands: build, serve, and migrate. (#690) * Minor Enhancements * "Keep files" feature (#685) * Output full path & name for files that don't parse (#745)