This guide covers using Scraps as a static site generator (SSG).
Setup
Install Scraps
- Follow the Installation guide to install Scraps on your system
Initialize Project
Create a new Scraps project using Init:
❯ scraps init my-knowledge-base ❯ cd my-knowledge-base
Configure Project
- Follow Configuration to set up your
.scraps.toml
- Follow Configuration to set up your
Content Creation
Write Markdown Files
- Create Markdown files in the
/scrapsdirectory - Use CommonMark and GitHub-flavored Markdown
- Create Markdown files in the
Add Internal Links
- Connect documents using Normal Link syntax:
[[Page Name]]for simple links[[Page Name|Custom Text]]for custom link text
- Connect documents using Normal Link syntax:
Enhance Content
- Add Mermaid diagrams for visual representations
- Use Autolink functionality for external links
- Organize with context folders when needed
Build and Preview
Generate Site
Use Build to generate static site files:
❯ scraps build
Preview Locally
Use Serve for local preview and debugging:
❯ scraps serve
Deploy
- Deploy to platforms like Deploy to GitHub Pages when ready
Quality Check
Lint: Use Lint to check wiki-link quality:
❯ scraps lint
AI Integration
- MCP Server: Enable AI assistant integration using Integrate with AI Assistants for intelligent search and content assistance