Welcome to Krik

January 15, 2024

Krik logo

Welcome to the Krik static site generator! This post demonstrates many of the features available in this fast, Rust-powered static site generator.

Table of Contents

This post has a table of contents enabled via toc: true in the front matter. You should see a TOC in the sidebar with clickable links to each section.

Markdown Features

Krik supports full GitHub Flavored Markdown with many enhancements:

Text Formatting

You can use italic text, bold text, strikethrough, and inline code.

Lists

Unordered lists:

  • First item
  • Second item
    • Nested item
    • Another nested item
  • Third item

Ordered lists:

  1. First step
  2. Second step
  3. Third step

Code Blocks

fn main() {
    println!("Hello, Krik!");
}
// Theme toggle functionality
function toggleTheme() {
    const currentTheme = document.documentElement.getAttribute('data-theme') || 'light';
    const newTheme = currentTheme === 'light' ? 'dark' : 'light';
    document.documentElement.setAttribute('data-theme', newTheme);
    localStorage.setItem('theme', newTheme);
}

Tables

FeatureStatusDescription
MarkdownFull GFM support
ThemesLight/dark mode
i18nMulti-language
FeedsAtom/RSS feeds
Dev ServerLive reload & file watching
Site InitEmbedded content & themes
Content CreationQuick post & page generation

Footnotes

This is a paragraph with a footnote1. You can click on it to jump to the definition, and then click the return arrow to come back.

Here’s another footnote2 with different content.

Advanced Features

Theme System

The site automatically detects your OS theme preference and switches between light and dark modes. Try toggling your system theme or use the theme button in the top navigation!

Scroll to Top

On longer pages like this one, you’ll see a scroll-to-top button appear in the bottom-right corner when you scroll down. It provides smooth scrolling back to the top.

Navigation

The sidebar shows all pages on your site, and posts like this one include a “Back to Home” link for easy navigation. On mobile devices, the sidebar transforms into a convenient hamburger menu.

Development Server

Krik includes a powerful development server with live reload functionality:

kk server                    # Start with live reload
kk server --no-live-reload   # Mobile-safe mode for Safari/iPad

The server automatically watches for changes and refreshes your browser, making development fast and efficient.

Content Creation

Create new content quickly with built-in commands:

kk post "My New Blog Post"   # Create a new blog post
kk page "About Us"           # Create a new page

Both commands generate files with proper front matter and helpful starter content.


This is just the beginning! Check out the other posts and pages to see more features in action, or try the new commands to create your own content.

1

This is the first footnote. Click the return arrow (↩) to go back to the text.

2

This is the second footnote with some additional content to show how multiple footnotes work.

welcomestatic-siterust