CLI Reference
SuCoS is a command-line tool. All functionality is accessed through subcommands. Note that the command is case-sensitive: SuCoS.
Commands
| Command | Description |
|---|---|
SuCoS build |
Compile the site and write output to public/ |
SuCoS serve |
Start a local dev server with live reload |
SuCoS new-site |
Scaffold a new site structure |
SuCoS new-theme |
Scaffold a new theme in themes/ |
SuCoS api |
Generate API docs from C# source code |
SuCoS validate-links |
Check for broken internal and external links |
Global options
These options are accepted by most commands:
| Option | Short | Description |
|---|---|---|
--source <path> |
-s |
Site source directory (default: ./) |
--verbose |
-v |
Print detailed output |
--help |
-h |
Show help |
--version |
Show version number |
Content filtering options
build, serve, api, and validate-links accept these flags to include content that is normally excluded:
| Option | Short | Description |
|---|---|---|
--draft |
-d |
Include pages marked Draft: true |
--future |
-f |
Include pages with a future Date |
--expired |
-e |
Include pages past their ExpiryDate |
Quick examples
# Build the site
SuCoS build
# Serve locally with live reload
SuCoS serve
# Build including drafts
SuCoS build --draft
# Build from a different directory
SuCoS build --source ./my-site --output ./dist