Sorted navigation menu with Jekyll and Liquid

Since Jekyll 2.2.0 you can sort an array of objects by any object property. You can now do : {% assign pages = site.pages | sort:”weight” %} <ul> {% for p in pages %} <li> <a {% if p.url == page.url %}class=”active”{% endif %} href=”https://stackoverflow.com/questions/9053066/{{ p.url }}”> {{ p.title }} </a> </li> {% endfor %} … Read more

Local post assets with Jekyll

I wrote a plugin to let me organise assets in subdirectories easily: https://github.com/samrayner/jekyll-asset-path-plugin {% asset_path my-image.png %} in post 2013-01-01-post-title would output: /assets/posts/post-title/my-image.png in page my-first-page would output: /assets/my-first-page/my-image.png

Using MathJax with Jekyll

Certainly you can use mathjax with Jekyll. To get this working make sure that If you’re writing your post in markdown, your markdown interpreter isn’t hammering your mathjax input. The best way to protect it I have found is to always put display math in <div> elements and inline math in <span> elements, which most … Read more

How to support latex in GitHub-pages?

Since resources online have changed regarding this question, here’s an update on supporting LateX with GitHub Pages. Note that the closest to Latex rendering without exporting as images and natively supporting it on your Jekyll site would be to use MathJax. MathJax is actually recommended in Jekyllrb docs for math support, with Kramdown, it also … Read more

Jekyll post not generated

The post is not placed in the _posts directory. When you change the collections_dir in your config from . (default) to my_col_folder all your posts have to move as well below my_col_folder/_posts jekyll defaults The post has incorrect title. Posts should be named YEAR-MONTH-DAY-title.MARKUP (Note the MARKUP extension, which is usually .md or .markdown) The … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)