Scraps Doc

Getting Started

commited date: 2024-06-21

Installation

❯ cargo install scraps

mac OS

❯ brew install boykush/tap/scraps

Init project

git command is required for features

❯ scraps init your-scraps-project
❯ cd your-scraps-project

The output result will look like this

❯ tree -a -L 1
.
├── .git
├── .gitignore
├── Config.toml
└── scraps

Configuration

Edit Config.toml to settings.

title = "your scraps project"

See Configuration for other config.

Write scraps

Write markdown files under /scraps dir.

❯ tree scraps
scraps
├── Getting Started.md
└── Scraps.md

See Scraps for scraps notation in markdown files.

Build a static site

❯ scraps build

The output will be a slugged html file as follows.

❯ tree public
public
├── getting-started.html
├── scraps.html
├── index.html
└── main.css

Debug server

❯ scraps serve

You can debug the build outputs by visiting http://127.0.0.1:1112

Deploy pages

See Deploy.