You don't have javascript enabled. Good luck! :(

Haskell

  Feb 18, 2016     Lamsong     blog  UPDATE: Jan 10, 2018

Jekyll blog

jekyll blog

All about jekyll!

Liquid Synatax

https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

Add your own liquid tag

To add a new liquid tag, just creating a plugin (ruby) to your jekyll project, add a class that inherit from Liquid::Tag, and register the tag.

Code sample:

# Jekyll plugin to add new liquid tag.
#
# file name: *.rb
# liquid tag: test

class Test < Liquid::Tag

  def initialize(tag_name, markup, tokens)
    super
  end

  def render(context)
    page_url = context.environments.first["page"]["url"]
    var = @markup.split

    <<-MARKUP.strip
    <div>
      <a href="#{page_url}">page url</a>

      <p>tag name: #{@tag_name}</p>

      #{@markup}
      <li>#{var[0]}</li>
      <li>#{var[1]}</li>
    </div>
    MARKUP
  end

  Liquid::Template.register_tag "test", self
end

Add {% test hello world %} to your post, then the output will be:

<div>
    <a href="/posts/jekyll-blog/welcome-to-jekyll.html">page url</a>

    <p>tag name: test</p>

    hello world
    <li>hello</li>
    <li>world</li>
</div>

Includes

See jekyllrb doc

  • The include tag allows you to include the content from another file stored in the _includes folder.
  • The include_relative tag allows you include file fragments relatively.

Synatax highlight

pygmentize -S monokai -f html > your/path/pygments.css