Project structure
Create an empty directory for the project, enter it, and run:
sklair init
sklair init asks where your source, components, layouts, hooks, and built site should live. Press Enter to accept a default. It writes sklair.json; it does not create the directories themselves.
For this guide, use the defaults and create the following structure:
my-site/
├── sklair.json
├── src/
│ └── index.html
├── components/
│ └── SiteGreeting.html
├── layouts/
└── build/
The files can remain empty for now. The next page fills them in.
What each directory does
| Path | Purpose |
|---|---|
sklair.json |
Configures the project. Paths inside it are relative to this file. |
src/ |
Contains pages and static files. HTML is compiled; neighbouring files are copied. |
components/ |
Contains reusable HTML components. |
layouts/ |
Contains full-document layouts used by generated documents. It may be empty. |
build/ |
Receives the completed site. Sklair replaces it after a successful build. |
Sklair does not require this exact layout. Change the paths in sklair.json if an existing project is arranged differently.
Sklair's workspace
During a build, Sklair creates .sklair beside the configuration file:
.sklair/
├── cache/
├── generated/
└── temp/
Hooks may keep reusable data in cache. Generated inputs and temporary files are cleared when appropriate. sklair clean removes the output directory and the entire .sklair workspace.