| Crates.io | krik |
| lib.rs | krik |
| version | 0.1.27 |
| created_at | 2025-07-26 02:00:27.500812+00 |
| updated_at | 2025-08-31 02:24:54.09579+00 |
| description | A fast static site generator written in Rust with internationalization, theming, and modern web features |
| homepage | https://github.com/mcaserta/krik/ |
| repository | https://github.com/mcaserta/krik/ |
| max_upload_size | |
| id | 1768624 |
| size | 885,205 |

A fast static site generator written in Rust 🦀 that transforms Markdown files into beautiful, responsive websites with internationalization support and modern theming ✨
draft: true in front mattersite.tomlfile.lang.md pattern (e.g., post.it.md → Italian)foo.it.md), it will be included<xhtml:link> alternate
language declarations)toc: truepdf: true in front matter)See Krik in action! My personal website is built with Krik and showcases real-world usage:
The demo site includes example posts demonstrating markdown features, theme switching, internationalization, and all the advanced capabilities that make Krik a powerful static site generator.
Download the latest release for your platform:
# Linux x64
wget https://github.com/mcaserta/krik/releases/latest/download/kk-linux-x86_64
chmod +x kk-linux-x86_64
sudo mv kk-linux-x86_64 /usr/local/bin/kk
# macOS (Intel)
wget https://github.com/mcaserta/krik/releases/latest/download/kk-macos-x86_64
chmod +x kk-macos-x86_64
sudo mv kk-macos-x86_64 /usr/local/bin/kk
# macOS (Apple Silicon)
wget https://github.com/mcaserta/krik/releases/latest/download/kk-macos-aarch64
chmod +x kk-macos-aarch64
sudo mv kk-macos-aarch64 /usr/local/bin/kk
# Windows (download and add to PATH)
# https://github.com/mcaserta/krik/releases/latest/download/kk-windows-x86_64.exe
cargo install krik
git clone https://github.com/mcaserta/krik.git
cd krik
cargo build --release
The executable will be available at target/release/kk.
Create a new Krik site with sample content and default theme:
kk init # Initialize in current directory
kk init my-blog # Initialize in new directory
kk init my-blog --force # Overwrite existing files
Create new blog posts and pages quickly:
kk post "My Great Post" # Create new blog post
kk post # Create with default title "New post"
kk post "Custom Post" -f my-slug # Custom filename
kk page "About Us" # Create new page
kk page # Create with default title "New page"
kk page "Contact" -f contact # Custom filename
Generate a site from the current directory:
kk
kk server # Start on port 3000 with live reload
kk server --port 8080 # Custom port
kk server --no-live-reload # Disable live reload (useful for mobile devices)
Features: Live reload, file watching, multi-interface binding, network discovery
kk lint # Lint default content directory
kk lint --input ./content # Lint a specific directory
kk lint --strict # Treat warnings as errors
kk lint --check-links # Check for broken HTTP(S) links
kk lint --create-report # Generate HTML report
kk lint --check-links --create-report --strict # Full validation with report
The linter validates:
toc is not a booleanLink Rot Scanning (--check-links):
HTML Report Generation (--create-report):
krik-report-YYYY-MM-DDTHH-MM-SSZ.html)Exits non-zero on errors. In --strict mode, warnings are also treated as
errors.
kk --input /path/to/content --output /path/to/site --theme /path/to/theme
-i, --input <DIR>: Input directory (default: content)-o, --output <DIR>: Output directory (default: _site)-t, --theme <DIR>: Theme directory (default: themes/default)-p, --port <PORT>: Server port (default: 3000)--no-live-reload: Disable live reload functionality (server subcommand only)content/
├── site.toml # Site configuration (not copied to output)
├── posts/ # Blog posts (uses 'post' template)
│ ├── sample.md
│ ├── sample.it.md # Italian translation
│ └── time-series.md
├── pages/ # Static pages (uses 'page' template)
│ └── about.md
├── images/ # Static files (copied as-is)
│ └── logo.png
└── any-file.md # Root level files (uses 'page' template)
title = "My Blog"
base_url = "https://example.com" # Optional, for feeds
Add metadata to your markdown files using YAML front matter:
---
title: "My Blog Post"
date: 2024-01-15T10:30:00Z
layout: post
tags: ["rust", "static-site", "web"]
toc: true
draft: false # Set to true to skip processing
---
# Your content here
Fields: title, date, draft, layout, tags, toc
Tera-based templates with light/dark mode auto-detection and manual toggle.
Templates automatically chosen based on directory (posts/ → post template,
pages/ → page template). Override with layout field in front matter.
Krik uses typed errors for clear diagnostics and proper exit codes:
KrikError (configuration, I/O, markdown, template,
theme, server, content, generation)Tips:
-v/--verbose for detailed logsKrik sites can be automatically deployed to GitHub Pages using GitHub Actions. Create .github/workflows/build-and-deploy.yml.
Setup Steps:
content/ directorygh-pagesThe workflow automatically:
kkgh-pages branch.nojekyll to prevent Jekyll processingcargo build
cargo test
cargo run -- --input ./content --output ./_site
MIT License