Markdown Tips and Tricks

published:

tags: [ #markdown, #writing, #tips ]

Markdown is the backbone of content in Zola. Here are some tips and tricks to make the most of it.

Text Formatting

The basics you probably already know:

  • Bold with **double asterisks**
  • Italic with *single asterisks*
  • Strikethrough with ~~double tildes~~
  • Inline code with backticks

Standard Markdown links work as expected:

[Link text](https://example.com)
![Alt text](/img/photo.jpg)

Code Blocks

Zola has built-in syntax highlighting. Specify the language after the opening triple backticks:

fn main() {
    println!("Hello from Zola!");
}
def greet(name: str) -> str:
    return f"Hello, {name}!"

Tables

Markdown tables are supported out of the box:

FeatureSupported
TablesYes
Syntax highlightingYes
Sass compilationYes
Feed generationYes

Block Quotes

Block quotes are great for calling out important information or quoting external sources.

Task Lists

  • Set up Zola project
  • Choose a theme
  • Write more blog posts
  • Deploy to production

Shortcodes

Zola supports shortcodes for reusable content snippets. You can define them in templates/shortcodes/ and use them in your Markdown:

{{ youtube(id="video_id") }}

Check the Zola shortcode documentation for more details.

Summary Separator

Use the <!-- more --> comment to control where the post preview ends on listing pages. Everything before the separator appears as the summary.