phantasmagoria

A brief Jekyll reference

Last modified .

By default, Jekyll uses the kramdown Markdown renderer and its parser-gfm parser. gfm here means GitHub Flavored Markdown.

rogue is used for syntax highlighting. Here's some pretty Rust.

fn print_hello(name: &str) {
    println!("Hello, {}.", name);
}

fn main() {
    print_hello("Elizabeth");
}

kramdown supports LaTeX \LaTeX if you have something to render it with!

1+i=0n12i=1+(1+2++2n1)=1+(2n1)=2n \begin{aligned} 1 + \sum_{i = 0}^{n - 1} 2 ^ i &= 1 + \left( 1 + 2 + \dots + 2 ^ {n - 1} \right) \\ &= 1 + (2 ^ n - 1) \\ &= 2 ^ n \end{aligned}

I'm using MathJax. Note that kramdown's delimeters for display and inline math are both $$. The former must appear on block boundaries.

I overrode the post.html file in Jekyll's default theme minima and included MathJax using these scripts. This isn't an ideal solution, because my custom post.html will shadow any updates to the corresponding file in the theme's gem. I also included the following HTML to make sure MathJax doesn't overflow its container, but I probably shouldn't be styling MathJax's internal classes. I'm not sure if there's a way to accomplish this using MathJax's configuration object.

<style> mjx-container { overflow-x: auto; } </style>