It has been a while since I posted the previous blog. During this time, much of my note-taking has migrated to Notion, so there will likely be less “reading notes” type of blogs as seen in the past few posts. Now it may be a good time to clean up the blog a bit, while thinking about other interesting topics suitable to be posted here.

# Styling

Headings of the markdown source of this blog has been insistent, due to the blog’s prior life on Wordpress and later migration to Jekyll. I’ve sometimes used ### (H3) as the top headings. This round of revision will change all that: all headings start the nesting from # (H1). The styling of the headings will be controlled by CSS solely.

# Markdown specifics

## Front matter

Jekyll has a lot to offer in the markdown front matter. However, not all of them are that useful. The ones I’ll keep for each post will be title, author, layout, categories, and tags. The rest of them will be removed for now and used only when very necessary.

Some other front matter fields are left-over from the Wordpress era. They will be removed too.

## Code snippets

There are three ways to insert code snippet blocks into the markdown.

1. Indent all code by 4 spaces. This approach won’t allow you to specify the language of the code.
2. Use three back quotes to wrap before and end of the block. I can optionally specify the language right after the opening back quotes.
3. Jekyll has builtin syntax highlighting support with a special tag highlight. With this syntax, you can specify language and also control if line numbers are supposed to be shown. The only draw back of this is that, if the code block appears inside a numbered list，the numbering for rest of the list after the code block will be reset.

Going forward, I’ll favor the third option more, and avoid numbered lists.

## HTML tags and entity symbols

Paragraphs, code blocks, image and URL links also got some left-over from the Wordpress era. There are <p>, <pre>, <a>, <img>, <div> tags here and there. Also the <em> tag when used in post titles would trim the content as the browser page title.

Some HTML entity symbols can be handled nicely by the Jekyll engine, so there is no need to keep the HTML.

## Image files location

Some images links refer to images not in the standard images subfolder, but in the wp-content/upload/ folder.

## MathJax

If I want to use MathJax in a certain post, I’d usemathjax: true to the front matter, then in the page I can use double  to wrap around the LaTeX markup.

This is done using post_url syntax, for which Jekyll will translate to the proper link.