/ notes
A collection of thoughts, things I've learnt and things I want to remember

Jekyll tips

Can extend a template by adding frontmatter to .html template file. E.g. extend default.html with

layout: default

<!-- html content -->

Include content from other files with include_relative. Jekyll docs on include_relative

{% include_relative _members/ %}

Only works for files in or below current directory.

You can add classes to rendered markdown blocks. And other attributes too but the main use case is for css classes.

> a blockquote with an added class
{: .css-class}

GitHub pages uses Kramdown markdown. You can achieve the same effect in python by enabling the attr_list extension. E.g. markdown.markdown(some_text, extensions=['attr_list']).

You can set Front matter defaults. You do this in config.yml.

For example, if you want to set an attribute on all posts you can put

      path: ""      # empty string for all files
      type: posts   # limit to posts
      is_post: true # automatically set is_post=true for all posts