Using build and serve sub-commands in docs

This commit is contained in:
Parker Moore 2013-01-11 23:50:13 -08:00
parent 14cabab254
commit 9fc89482b3
6 changed files with 16 additions and 13 deletions

View File

@ -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 %}

View File

@ -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 dont have to specify the flag every time).

View File

@ -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 %}

View File

@ -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

View File

@ -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 <destination>
jekyll build --destination <destination>
#=> The current folder will get generated into <destination>
jekyll <source> <destination>
jekyll build --source <source> --destination <destination>
#=> The <source> folder will get generated into <destination>
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.

View File

@ -54,7 +54,7 @@ overview: true
<p class="line">
<span class="path">~/my/awesome/site</span>
<span class="prompt">$</span>
<span class="command">jekyll --server</span>
<span class="command">jekyll serve</span>
</p>
<p class="line">
<span class="output"># => Now browse to http://localhost:4000</span>