jekyll-docs 3.0.3 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/site/_config.yml +4 -0
  3. data/site/_data/docs.yml +3 -1
  4. data/site/_docs/assets.md +4 -3
  5. data/site/_docs/conduct.md +55 -0
  6. data/site/_docs/configuration.md +77 -7
  7. data/site/_docs/contributing.md +1 -1
  8. data/site/_docs/datafiles.md +3 -3
  9. data/site/_docs/deployment-methods.md +49 -28
  10. data/site/_docs/extras.md +1 -1
  11. data/site/_docs/github-pages.md +27 -28
  12. data/site/_docs/history.md +356 -196
  13. data/site/_docs/index.md +1 -0
  14. data/site/_docs/installation.md +4 -4
  15. data/site/_docs/pages.md +20 -4
  16. data/site/_docs/pagination.md +7 -4
  17. data/site/_docs/permalinks.md +4 -3
  18. data/site/_docs/plugins.md +20 -8
  19. data/site/_docs/posts.md +8 -8
  20. data/site/_docs/quickstart.md +1 -2
  21. data/site/_docs/resources.md +16 -24
  22. data/site/_docs/sites.md +1 -7
  23. data/site/_docs/structure.md +3 -3
  24. data/site/_docs/templates.md +39 -13
  25. data/site/_docs/upgrading.md +3 -133
  26. data/site/_docs/upgrading/0-to-2.md +140 -0
  27. data/site/_docs/upgrading/2-to-3.md +126 -0
  28. data/site/_docs/variables.md +1 -1
  29. data/site/_docs/windows.md +5 -3
  30. data/site/_includes/docs_ul.html +2 -6
  31. data/site/_includes/footer.html +1 -1
  32. data/site/_posts/2015-10-26-jekyll-3-0-released.markdown +1 -1
  33. data/site/_posts/2016-01-20-jekyll-3-0-2-released.markdown +5 -0
  34. data/site/_posts/2016-01-24-jekyll-3-1-0-released.markdown +50 -0
  35. data/site/_posts/2016-01-28-jekyll-3-1-1-released.markdown +33 -0
  36. data/site/_posts/2016-02-08-jekyll-3-0-3-released.markdown +4 -3
  37. data/site/_posts/2016-02-19-jekyll-3-1-2-released.markdown +20 -0
  38. data/site/_sass/_style.scss +4 -0
  39. data/site/help/index.md +5 -0
  40. data/site/index.html +2 -2
  41. data/site/latest_version.txt +1 -1
  42. data/site/redirects/github.html +4 -0
  43. data/site/redirects/issues.html +4 -0
  44. metadata +11 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f516971da8b5173528c10ffc951a3ab53986576
4
- data.tar.gz: 2577f66a33d3402bdd832c1d8961fe725a22ec18
3
+ metadata.gz: 424f6c916ec8bdc438ccc930df293f89d1857c96
4
+ data.tar.gz: 19bc4169b6274f56ab0f7b0a60d84d2ed1ad96fe
5
5
  SHA512:
6
- metadata.gz: 3a4d59816c59bb0ab3f9d6e8af7cd576de38d55aa1af058049d3b8f9cc0cf5f1a30194983a0eb3fbb22af740d13948a9460149d7350e5fc417a59fffd5d52177
7
- data.tar.gz: b73b89b5ff1589ccc268c5dc3780c60dca889a74e55262173b05630cc1d83bdda7688052acd895305859fcb0ce6ac598c0c6260c49aa4f5da4482124de07f2e5
6
+ metadata.gz: 46206c8fdc04f3f8ab0852cbac4b66f74d0ba86619329a01c663321f1d8b021a9069e3aacca3e015681c580b7e5604cea9ec378421e733072fa5aae9d1353e56
7
+ data.tar.gz: f9d1f3f20808fe0001aadae5707ecc563eadc14455baf76cd3c677962e73a25a3797bbd1e08d4ff31f7859f1aa8b605863b0dcbd2609e2ff10deec51773c919b
data/site/_config.yml CHANGED
@@ -9,6 +9,8 @@ google_analytics_id: UA-50755011-1
9
9
  repository: https://github.com/jekyll/jekyll
10
10
  help_url: https://github.com/jekyll/jekyll-help
11
11
 
12
+ timezone: America/Los_Angeles
13
+
12
14
  collections:
13
15
  docs:
14
16
  output: true
@@ -19,3 +21,5 @@ url: http://jekyllrb.com
19
21
 
20
22
  gems:
21
23
  - jekyll-feed
24
+ - jekyll-redirect-from
25
+ - jemoji
data/site/_data/docs.yml CHANGED
@@ -39,9 +39,11 @@
39
39
  - troubleshooting
40
40
  - sites
41
41
  - resources
42
- - upgrading
42
+ - upgrading/0-to-2
43
+ - upgrading/2-to-3
43
44
 
44
45
  - title: Meta
45
46
  docs:
46
47
  - contributing
48
+ - conduct
47
49
  - history
data/site/_docs/assets.md CHANGED
@@ -83,9 +83,10 @@ here, too.
83
83
 
84
84
  ## Coffeescript
85
85
 
86
- To enable Coffeescript in Jekyll 3.0 and up you must
87
- * Install the `jekyll-coffeescript` gem
88
- * Ensure that your `_config.yml` is up-to-date and includes the following
86
+ To enable Coffeescript in Jekyll 3.0 and up you must
87
+
88
+ * Install the `jekyll-coffeescript` gem
89
+ * Ensure that your `_config.yml` is up-to-date and includes the following:
89
90
 
90
91
  {% highlight yaml %}
91
92
  gems:
@@ -0,0 +1,55 @@
1
+ ---
2
+ layout: docs
3
+ title: Code of Conduct
4
+ permalink: "/docs/conduct/"
5
+ redirect_from: "/conduct/index.html"
6
+ editable: false
7
+ ---
8
+
9
+ As contributors and maintainers of this project, and in the interest of
10
+ fostering an open and welcoming community, we pledge to respect all people who
11
+ contribute through reporting issues, posting feature requests, updating
12
+ documentation, submitting pull requests or patches, and other activities.
13
+
14
+ We are committed to making participation in this project a harassment-free
15
+ experience for everyone, regardless of level of experience, gender, gender
16
+ identity and expression, sexual orientation, disability, personal appearance,
17
+ body size, race, ethnicity, age, religion, or nationality.
18
+
19
+ Examples of unacceptable behavior by participants include:
20
+
21
+ * The use of sexualized language or imagery
22
+ * Personal attacks
23
+ * Trolling or insulting/derogatory comments
24
+ * Public or private harassment
25
+ * Publishing other's private information, such as physical or electronic
26
+ addresses, without explicit permission
27
+ * Other unethical or unprofessional conduct
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or
30
+ reject comments, commits, code, wiki edits, issues, and other contributions
31
+ that are not aligned to this Code of Conduct, or to ban temporarily or
32
+ permanently any contributor for other behaviors that they deem inappropriate,
33
+ threatening, offensive, or harmful.
34
+
35
+ By adopting this Code of Conduct, project maintainers commit themselves to
36
+ fairly and consistently applying these principles to every aspect of managing
37
+ this project. Project maintainers who do not follow or enforce the Code of
38
+ Conduct may be permanently removed from the project team.
39
+
40
+ This Code of Conduct applies both within project spaces and in public spaces
41
+ when an individual is representing the project or its community.
42
+
43
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
44
+ reported by opening an issue or contacting a project maintainer. All complaints
45
+ will be reviewed and investigated and will result in a response that is deemed
46
+ necessary and appropriate to the circumstances. Maintainers are obligated to
47
+ maintain confidentiality with regard to the reporter of an incident.
48
+
49
+
50
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
51
+ version 1.3.0, available at
52
+ [http://contributor-covenant.org/version/1/3/0/][version]
53
+
54
+ [homepage]: http://contributor-covenant.org
55
+ [version]: http://contributor-covenant.org/version/1/3/0/
@@ -120,7 +120,7 @@ class="flag">flags</code> (specified on the command-line) that control them.
120
120
  <td>
121
121
  <p class="name"><strong>Encoding</strong></p>
122
122
  <p class="description">
123
- Set the encoding of files by name. Only available for Ruby
123
+ Set the encoding of files by name (only available for Ruby
124
124
  1.9 or later).
125
125
  The default value is <code>utf-8</code> starting in 2.0.0,
126
126
  and <code>nil</code> before 2.0.0, which will yield the Ruby
@@ -198,6 +198,7 @@ class="flag">flags</code> (specified on the command-line) that control them.
198
198
  <p class="description">Process and render draft posts.</p>
199
199
  </td>
200
200
  <td class="align-center">
201
+ <p><code class="option">show_drafts: BOOL</code></p>
201
202
  <p><code class="flag">--drafts</code></p>
202
203
  </td>
203
204
  </tr>
@@ -352,6 +353,24 @@ before your site is served.
352
353
  <p><code class="flag">--skip-initial-build</code></p>
353
354
  </td>
354
355
  </tr>
356
+ <tr class="setting">
357
+ <td>
358
+ <p class="name"><strong>X.509 (SSL) Private Key</strong></p>
359
+ <p class="description">SSL Private Key.</p>
360
+ </td>
361
+ <td class="align-center">
362
+ <p><code class="flag">--ssl-key</code></p>
363
+ </td>
364
+ </tr>
365
+ <tr class="setting">
366
+ <td>
367
+ <p class="name"><strong>X.509 (SSL) Certificate</strong></p>
368
+ <p class="description">SSL Public certificate.</p>
369
+ </td>
370
+ <td class="align-center">
371
+ <p><code class="flag">--ssl-cert</code></p>
372
+ </td>
373
+ </tr>
355
374
  </tbody>
356
375
  </table>
357
376
  </div>
@@ -364,6 +383,24 @@ before your site is served.
364
383
  </p>
365
384
  </div>
366
385
 
386
+ ## Custom WEBRick Headers
387
+
388
+ You can provide custom headers for your site by adding them to `_config.yml`
389
+
390
+ {% highlight yaml %}
391
+ # File: _config.yml
392
+ webrick:
393
+ headers:
394
+ My-Header: My-Value
395
+ My-Other-Header: My-Other-Value
396
+ {% endhighlight %}
397
+
398
+ ### Defaults
399
+
400
+ We only provide one default and that's a Content-Type header that disables
401
+ caching in development so that you don't have to fight with Chrome's aggressive
402
+ caching when you are in development mode.
403
+
367
404
  ## Specifying a Jekyll environment at build time
368
405
 
369
406
  In the build (or serve) arguments, you can specify a Jekyll environment and value. The build will then apply this value in any conditional statements in your content.
@@ -452,7 +489,7 @@ With these defaults, all posts would use the `my-site` layout. Any html files th
452
489
  {% highlight yaml %}
453
490
  collections:
454
491
  - my_collection:
455
- output: true
492
+ output: true
456
493
 
457
494
  defaults:
458
495
  -
@@ -463,13 +500,14 @@ defaults:
463
500
  layout: "default"
464
501
  {% endhighlight %}
465
502
 
466
- In this example the `layout` is set to `default` inside the [collection](../collections/) with the name `my_collection`.
503
+ In this example, the `layout` is set to `default` inside the
504
+ [collection](../collections/) with the name `my_collection`.
467
505
 
468
506
  ### Precedence
469
507
 
470
508
  Jekyll will apply all of the configuration settings you specify in the `defaults` section of your `_config.yml` file. However, you can choose to override settings from other scope/values pair by specifying a more specific path for the scope.
471
509
 
472
- You can see that in the last example above. First, we set the default layout to `my-site`. Then, using a more specific path, we set the default layout for files in the `projects/` path to `project`. This can be done with any value that you would set in the page or post front matter.
510
+ You can see that in the second to last example above. First, we set the default layout to `my-site`. Then, using a more specific path, we set the default layout for files in the `projects/` path to `project`. This can be done with any value that you would set in the page or post front matter.
473
511
 
474
512
  Finally, if you set defaults in the site configuration by adding a `defaults` section to your `_config.yml` file, you can override those settings in a post or page file. All you need to do is specify the settings in the post or page front matter. For example:
475
513
 
@@ -641,7 +679,7 @@ extensions are:
641
679
  ### Kramdown
642
680
 
643
681
  In addition to the defaults mentioned above, you can also turn on recognition
644
- of Github Flavored Markdown by passing an `input` option with a value of "GFM".
682
+ of GitHub Flavored Markdown by passing an `input` option with a value of "GFM".
645
683
 
646
684
  For example, in your `_config.yml`:
647
685
 
@@ -669,9 +707,41 @@ class Jekyll::Converters::Markdown::MyCustomProcessor
669
707
  end
670
708
  {% endhighlight %}
671
709
 
672
- Once you've created your class and have it properly setup either as a plugin in
673
- the `_plugins` folder or as a gem, specify it in your `_config.yml`:
710
+ Once you've created your class and have it properly set up either as a plugin
711
+ in the `_plugins` folder or as a gem, specify it in your `_config.yml`:
674
712
 
675
713
  {% highlight yaml %}
676
714
  markdown: MyCustomProcessor
677
715
  {% endhighlight %}
716
+
717
+ ## Incremental Regeneration
718
+ <div class="note warning">
719
+ <h5>Incremental regeneration is still an experimental feature</h5>
720
+ <p>
721
+ While incremental regeneration will work for the most common cases, it will
722
+ not work correctly in every scenario. Please be extremely cautious when
723
+ using the feature, and report any problems not listed below by
724
+ <a href="https://github.com/jekyll/jekyll/issues/new">opening an issue on GitHub</a>.
725
+ </p>
726
+ </div>
727
+
728
+ Incremental regeneration helps shorten build times by only generating documents
729
+ and pages that were updated since the previous build. It does this by keeping
730
+ track of both file modification times and inter-document dependencies in the
731
+ `.jekyll-metadata` file.
732
+
733
+ Under the current implementation, incremental regeneration will only generate a
734
+ document or page if either it, or one of its dependencies, is modified. Currently,
735
+ the only types of dependencies tracked are includes (using the
736
+ {% raw %}`{% include %}`{% endraw %} tag) and layouts. This means that plain
737
+ references to other documents (for example, the common case of iterating over
738
+ `site.posts` in a post listings page) will not be detected as a dependency.
739
+
740
+ To remedy some of these shortfalls, putting `regenerate: true` in the front-matter
741
+ of a document will force Jekyll to regenerate it regardless of whether it has been
742
+ modified. Note that this will generate the specified document only; references
743
+ to other documents' contents will not work since they won't be re-rendered.
744
+
745
+ Incremental regeneration can be enabled via the `--incremental` flag (`-I` for
746
+ short) from the command-line or by setting `incremental: true` in your
747
+ configuration file.
@@ -43,7 +43,7 @@ Test Dependencies
43
43
  -----------------
44
44
 
45
45
  To run the test suite and build the gem you'll need to install Jekyll's
46
- dependencies. Simply run this command to get all setup:
46
+ dependencies. Simply run this command to get all set up:
47
47
 
48
48
  <figure class="highlight"><pre><code>$ script/bootstrap</code></pre></figure>
49
49
 
@@ -33,8 +33,8 @@ of code in your Jekyll templates:
33
33
  In `_data/members.yml`:
34
34
 
35
35
  {% highlight yaml %}
36
- - name: Tom Preston-Werner
37
- github: mojombo
36
+ - name: Eric Mill
37
+ github: konklone
38
38
 
39
39
  - name: Parker Moore
40
40
  github: parkr
@@ -47,7 +47,7 @@ Or `_data/members.csv`:
47
47
 
48
48
  {% highlight text %}
49
49
  name,github
50
- Tom Preston-Werner,mojombo
50
+ Eric Mill,konklone
51
51
  Parker Moore,parkr
52
52
  Liu Fengyun,liufengyun
53
53
  {% endhighlight %}
@@ -90,7 +90,7 @@ Setup steps are fully documented
90
90
 
91
91
  ### Rake
92
92
 
93
- Another way to deploy your Jekyll site is to use [Rake](https://github.com/jimweirich/rake), [HighLine](https://github.com/JEG2/highline), and
93
+ Another way to deploy your Jekyll site is to use [Rake](https://github.com/ruby/rake), [HighLine](https://github.com/JEG2/highline), and
94
94
  [Net::SSH](https://github.com/net-ssh/net-ssh). A more complex example of deploying Jekyll with Rake that deals with multiple branches can be found in [Git Ready](https://github.com/gitready/gitready/blob/cdfbc4ec5321ff8d18c3ce936e9c749dbbc4f190/Rakefile).
95
95
 
96
96
 
@@ -102,64 +102,77 @@ Once you’ve generated the `_site` directory, you can easily scp it using a `ta
102
102
 
103
103
  Once you’ve generated the `_site` directory, you can easily rsync it using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/vitalyrepin/vrepinblog/blob/master/transfer.sh). You’d obviously need to change the values to reflect your site’s details.
104
104
 
105
- #### Step 1: Install rrsync to your home folder (server-side)
105
+ Certificate-based authorization is another way to simplify the publishing
106
+ process. It makes sense to restrict rsync access only to the directory which it is supposed to sync. This can be done using rrsync.
106
107
 
107
- We will use certificate-based authorization to simplify the publishing process. It makes sense to restrict rsync access only to the directory which it is supposed to sync.
108
+ #### Step 1: Install rrsync to your home folder (server-side)
108
109
 
109
- That's why rrsync wrapper shall be installed. If it is not already installed by your hoster you can do it yourself:
110
+ If it is not already installed by your host, you can do it yourself:
110
111
 
111
- - [download rrsync](http://ftp.samba.org/pub/unpacked/rsync/support/rrsync)
112
- - Put it to the bin subdirectory of your home folder (```~/bin```)
113
- - Make it executable (```chmod +x```)
112
+ - [Download rrsync](http://ftp.samba.org/pub/unpacked/rsync/support/rrsync)
113
+ - Place it in the `bin` subdirectory of your home folder (`~/bin`)
114
+ - Make it executable (`chmod +x`)
114
115
 
115
- #### Step 2: Setup certificate-based ssh access (server side)
116
+ #### Step 2: Set up certificate-based SSH access (server side)
116
117
 
117
- [This process is described in a lot of places in the net](https://wiki.gentoo.org/wiki/SSH#Passwordless_Authentication). We will not cover it here. What is different from usual approach is to put the restriction to certificate-based authorization in ```~/.ssh/authorized_keys```). We will launch ```rrsync``` utility and supply it with the folder it shall have read-write access to:
118
+ This [process](https://wiki.gentoo.org/wiki/SSH#Passwordless_Authentication) is
119
+ described in several places online. What is different from the typical approach
120
+ is to put the restriction to certificate-based authorization in
121
+ `~/.ssh/authorized_keys`. Then, launch `rrsync` and supply
122
+ it with the folder it shall have read-write access to:
118
123
 
119
- ```
124
+ {% highlight bash %}
120
125
  command="$HOME/bin/rrsync <folder>",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa <cert>
121
- ```
126
+ {% endhighlight %}
122
127
 
123
- ```<folder>``` is the path to your site. E.g., ```~/public_html/you.org/blog-html/```.
128
+ `<folder>` is the path to your site. E.g., `~/public_html/you.org/blog-html/`.
124
129
 
125
- #### Step 3: Rsync! (client-side)
130
+ #### Step 3: Rsync (client-side)
126
131
 
127
- Add the script ```deploy``` to the web site source folder:
132
+ Add the `deploy` script to the site source folder:
128
133
 
129
134
  {% highlight bash %}
130
135
  #!/bin/sh
131
136
 
132
- rsync -avr --rsh='ssh -p2222' --delete-after --delete-excluded <folder> <user>@<site>:
137
+ rsync -crvz --rsh=ssh -p2222' --delete-after --delete-excluded <folder> <user>@<site>:
133
138
  {% endhighlight %}
134
139
 
135
140
  Command line parameters are:
136
141
 
137
- - ```--rsh='ssh -p2222'``` It is needed if your hoster provides ssh access using ssh port different from default one (e.g., this is what hostgator is doing)
138
- - ```<folder>``` is the name of the local folder with generated web content. By default it is ```_site/``` for Jekyll
139
- - ```<user>``` &mdash; ssh user name for your hosting account
140
- - ```<site>``` &mdash; your hosting server
142
+ - `--rsh=ssh -p2222` &mdash; The port for SSH access. It is required if
143
+ your host uses a different port than the default (e.g, HostGator)
144
+ - `<folder>` &mdash; The name of the local output folder (defaults to `_site`)
145
+ - `<user>` &mdash; The username for your hosting account
146
+ - `<site>` &mdash; Your hosting server
141
147
 
142
- Example command line is:
148
+ Using this setup, you might run the following command:
143
149
 
144
150
  {% highlight bash %}
145
- rsync -avr --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@vrepin.org:
151
+ rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@example.org:
146
152
  {% endhighlight %}
147
153
 
148
- Don't forget column ':' after server name!
154
+ Don't forget the column `:` after server name!
155
+
156
+ #### Step 4 (Optional): Exclude the transfer script from being copied to the output folder.
149
157
 
150
- #### Optional step 4: exclude transfer.sh from being copied to the output folder by Jekyll
158
+ This step is recommended if you use these instructions to deploy your site. If
159
+ you put the `deploy` script in the root folder of your project, Jekyll will
160
+ copy it to the output folder. This behavior can be changed in `_config.yml`.
151
161
 
152
- This step is recommended if you use this how-to to deploy Jekyll-based web site. If you put ```deploy``` script to the root folder of your project, Jekyll copies it to the output folder.
153
- This behavior can be changed in ```_config.yml```. Just add the following line there:
162
+ Just add the following line:
154
163
 
155
164
  {% highlight yaml %}
156
- # Do not copy these file to the output directory
165
+ # Do not copy these files to the output directory
157
166
  exclude: ["deploy"]
158
167
  {% endhighlight %}
159
168
 
160
- #### We are done!
169
+ Alternatively, you can use an `rsync-exclude.txt` file to control which files will be transferred to your server.
161
170
 
162
- Now it's possible to publish your web site by launching ```deploy``` script. If your ssh certificate is [passphrase-protected](https://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html), you are asked to enter the password.
171
+ #### Done!
172
+
173
+ Now it's possible to publish your website simply by running the `deploy`
174
+ script. If your SSH certificate is [passphrase-protected](https://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html), you will be asked to enter it when the
175
+ script executes.
163
176
 
164
177
  ## Rack-Jekyll
165
178
 
@@ -190,3 +203,11 @@ for that](https://github.com/openshift-cartridges/openshift-jekyll-cartridge).
190
203
  <h5>ProTip™: Use GitHub Pages for zero-hassle Jekyll hosting</h5>
191
204
  <p>GitHub Pages are powered by Jekyll behind the scenes, so if you’re looking for a zero-hassle, zero-cost solution, GitHub Pages are a great way to <a href="../github-pages/">host your Jekyll-powered website for free</a>.</p>
192
205
  </div>
206
+
207
+ ## Kickster
208
+
209
+ Use [Kickster](http://kickster.nielsenramon.com/) for easy (automated) deploys to GitHub Pages when using unsupported plugins on GitHub Pages.
210
+
211
+ Kickster provides a basic Jekyll project setup packed with web best practises and useful optimization tools increasing your overall project quality. Kickster ships with automated and worry-free deployment scripts for GitHub Pages.
212
+
213
+ Setting up Kickster is very easy, just install the gem and you are good to go. More documentation can here found [here](https://github.com/nielsenramon/kickster#kickster). If you do not want to use the gem or start a new project you can just copy paste the deployment scripts for [Travis CI](https://github.com/nielsenramon/kickster/tree/master/snippets/travis) or [Circle CI](https://github.com/nielsenramon/kickster#automated-deployment-with-circle-ci).
data/site/_docs/extras.md CHANGED
@@ -15,7 +15,7 @@ Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](ht
15
15
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
16
16
  {% endhighlight %}
17
17
 
18
- For more information about getting started, check out [this excellent blog post](http://gastonsanchez.com/blog/opinion/2014/02/16/Mathjax-with-jekyll.html).
18
+ For more information about getting started, check out [this excellent blog post](http://gastonsanchez.com/opinion/2014/02/16/Mathjax-with-jekyll/).
19
19
 
20
20
  ## Alternative Markdown Processors
21
21
 
@@ -10,6 +10,31 @@ organizations, and repositories, that are freely hosted on GitHub's
10
10
  powered by Jekyll behind the scenes, so in addition to supporting regular HTML
11
11
  content, they’re also a great way to host your Jekyll-powered website for free.
12
12
 
13
+ Never built a website with GitHub Pages before? [See this marvelous guide by
14
+ Jonathan McGlone to get you up and running](http://jmcglone.com/guides/github-pages/).
15
+ This guide will teach you what you need to know about Git, GitHub, and Jekyll to
16
+ create your very own website on GitHub Pages.
17
+
18
+ ### Project Page URL Structure
19
+
20
+ Sometimes it's nice to preview your Jekyll site before you push your `gh-pages`
21
+ branch to GitHub. However, the subdirectory-like URL structure GitHub uses for
22
+ Project Pages complicates the proper resolution of URLs. In order to assure your
23
+ site builds properly, use `site.github.url` in your URL's.
24
+
25
+ {% highlight html %}
26
+ {% raw %}
27
+ <!-- Useful for styles with static names... -->
28
+ <link href="{{ site.github.url }}/path/to/css.css" rel="stylesheet">
29
+ <!-- and for documents/pages whose URL's can change... -->
30
+ <a href="{{ page.url | prepend: site.github.url }}">{{ page.title }}</a>
31
+ {% endraw %}
32
+ {% endhighlight %}
33
+
34
+ This way you can preview your site locally from the site root on localhost,
35
+ but when GitHub generates your pages from the gh-pages branch all the URLs
36
+ will resolve properly.
37
+
13
38
  ## Deploying Jekyll to GitHub Pages
14
39
 
15
40
  GitHub Pages work by looking at certain branches of repositories on GitHub.
@@ -92,42 +117,16 @@ branch]({{ site.repository }}/tree/gh-pages) of the same repository.
92
117
  <div class="note warning">
93
118
  <h5>Source Files Must be in the Root Directory</h5>
94
119
  <p>
95
- Github Pages <a href="https://help.github.com/articles/troubleshooting-github-pages-build-failures#source-setting">overrides</a> the <a href="http://jekyllrb.com/docs/configuration/#global-configuration">“Site Source”</a> configuration value, so if you locate your files anywhere other than the root directory, your site may not build correctly.
120
+ GitHub Pages <a href="https://help.github.com/articles/troubleshooting-github-pages-build-failures#source-setting">overrides</a> the <a href="http://jekyllrb.com/docs/configuration/#global-configuration">“Site Source”</a> configuration value, so if you locate your files anywhere other than the root directory, your site may not build correctly.
96
121
  </p>
97
122
  </div>
98
123
 
99
-
100
- ### Project Page URL Structure
101
-
102
- Sometimes it's nice to preview your Jekyll site before you push your `gh-pages`
103
- branch to GitHub. However, the subdirectory-like URL structure GitHub uses for
104
- Project Pages complicates the proper resolution of URLs. Here is an approach to
105
- utilizing the GitHub Project Page URL structure (`username.github.io/project-name/`)
106
- whilst maintaining the ability to preview your Jekyll site locally.
107
-
108
- 1. In `_config.yml`, set the `baseurl` option to `/project-name` -- note the
109
- leading slash and the **absence** of a trailing slash.
110
- 2. When referencing JS or CSS files, do it like this:
111
- `{% raw %}{{ site.baseurl }}/path/to/css.css{% endraw %}` -- note the slash
112
- immediately following the variable (just before "path").
113
- 3. When doing permalinks or internal links, do it like this:
114
- `{% raw %}{{ site.baseurl }}{{ post.url }}{% endraw %}` -- note that there
115
- is **no** slash between the two variables.
116
- 4. Finally, if you'd like to preview your site before committing/deploying
117
- using `jekyll serve`, be sure to pass an **empty string** to the `--baseurl`
118
- option, so that you can view everything at `localhost:4000` normally
119
- (without `/project-name` at the beginning): `jekyll serve --baseurl ''`
120
-
121
- This way you can preview your site locally from the site root on localhost,
122
- but when GitHub generates your pages from the gh-pages branch all the URLs
123
- will start with `/project-name` and resolve properly.
124
-
125
124
  <div class="note">
126
125
  <h5>GitHub Pages Documentation, Help, and Support</h5>
127
126
  <p>
128
127
  For more information about what you can do with GitHub Pages, as well as for
129
128
  troubleshooting guides, you should check out <a
130
- href="https://help.github.com/categories/20/articles">GitHub’s Pages Help
129
+ href="https://help.github.com/categories/github-pages-basics/">GitHub’s Pages Help
131
130
  section</a>. If all else fails, you should contact <a
132
131
  href="https://github.com/contact">GitHub Support</a>.
133
132
  </p>