Skip to content

Instantly share code, notes, and snippets.

@mytharcher
Created January 15, 2012 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mytharcher/1616041 to your computer and use it in GitHub Desktop.
Save mytharcher/1616041 to your computer and use it in GitHub Desktop.
Tips of jekyll

Tips of jekyll

Here record some tips of jekyll when I set up sites with it.

  1. No BOM! UTF-8 BOM in Windows' text editors would bring any post with YAML head matter down!
  2. When put any posts out of /_posts folder, the category can not set. And the category would be the folder name which the post put in.
  3. Pagination permalink must be /pageN/ and use /index.html for index. Can not customize as /blog/page/N/. (Issue here)
  4. Including will be processed earlier than markdown converting.
  5. Any file which name starts with underscore(_) will not be copied when building.

Markdown Engines

  1. Problem in auto generating ID for header elements(h1-h6). (Issue here. Resolved by using kramdown markdown engine.)

  2. The feature of Table Of Content can not work by only using the {:toc} in a seperated line(Issue here). But if put a list line close before {:toc} will work right. example:

        * Anything
        {:toc}
    

if/else

  1. To judge if a variable not exist, use this syntax {% if var == null %}.

-EOF-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment