Markdown Feature Showcase

January 20, 2024

This post demonstrates all the markdown features supported by Krik, including some advanced formatting options.

Basic Text Formatting

Here are the basic text formatting options:

  • Bold text using **bold**
  • Italic text using *italic*
  • Strikethrough text using ~~strikethrough~~
  • Inline code using backticks
  • You can also combine bold and italic text

Headings

Krik supports all heading levels from H1 to H6. Since this post has TOC enabled, you can see how they’re organized in the table of contents.

This is H3

This is H4

This is H5
This is H6

Code Blocks

Syntax Highlighting Ready

// Rust code example
struct Config {
    title: String,
    base_url: Option<String>,
}

impl Config {
    fn new(title: &str) -> Self {
        Self {
            title: title.to_string(),
            base_url: None,
        }
    }
}
# Python code example
def generate_site(input_dir, output_dir):
    """Generate static site from markdown files."""
    for file in input_dir.glob("**/*.md"):
        process_markdown_file(file, output_dir)
    
    print("Site generated successfully!")
<!-- HTML code example -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Krik Demo</title>
</head>
<body>
    <h1>Hello, World!</h1>
</body>
</html>

Lists and Task Lists

Unordered Lists

  • First level item
  • Another first level item
    • Second level item
    • Another second level item
      • Third level item
      • Another third level item
  • Back to first level

Ordered Lists

  1. First numbered item
  2. Second numbered item
    1. Nested numbered item
    2. Another nested item
  3. Third numbered item

Task Lists

  • Completed task
  • Another completed task
  • Incomplete task
  • Another incomplete task
    • Nested completed task
    • Nested incomplete task

Tables

Here’s a comprehensive table showing Krik’s features:

Feature CategoryFeatureStatusDescription
CoreMarkdown ProcessingFull GFM support
CoreFront MatterYAML metadata
CoreDraft SupportSkip processing
ThemeLight/Dark ModeAuto-detection + toggle
ThemeResponsive DesignMobile-first approach
i18nMulti-languageFilename-based detection
i18nLanguage SelectorDropdown navigation
NavigationTOC GenerationAuto-generated from headings
NavigationFootnote LinksBidirectional navigation
NavigationScroll to TopSmart visibility
AdvancedAtom FeedsRFC 4287 compliant
AdvancedAsset CopyingPreserves structure

Blockquotes

This is a simple blockquote.

This is a multi-line blockquote. It can span multiple lines and even include other markdown elements.

Like bold text and italic text.

Blockquotes with headings

You can include headings in blockquotes:

  1. Numbered lists
  2. Work too
Even code blocks!

Horizontal Rules

You can create horizontal rules using three or more hyphens:


Or three or more asterisks:


Links

Reference Links

This is a paragraph with reference link and another link.

Images

Here’s how images work (note: no actual image file in this demo):

Alt text for image

Footnotes in Detail

Footnotes are particularly powerful in Krik1. They create bidirectional links with smooth scrolling2.

You can have multiple paragraphs in footnotes3, and they support full markdown formatting.

Escaping Characters

Sometimes you need to escape markdown characters: *not italic*, `not code`, [not a link].


This covers most of the markdown features supported by Krik. The combination of these features with the theme system, internationalization, and advanced navigation makes Krik a powerful choice for static site generation.

1

This is a simple footnote that demonstrates the basic functionality.

2

This footnote contains bold text, italic text, and even inline code. It shows how footnotes can contain rich formatting.

3

This is a multiline footnote.

It can contain multiple paragraphs, code blocks, and other markdown elements:

code in footnotes works too!

Pretty neat, right?

markdownfeaturesdemo