docs: rewrite homepage and consolidate sections

Rewrite _index.md as explanation-only — remove inline Quick
Start, add Learn More links. Move section discovery explanation
from features/sections.md into content-organization.md. Slim
sections.md to reference-only with cross-reference.
This commit is contained in:
Timothy DeHerrera
2026-02-12 13:04:07 -07:00
parent 73329aff81
commit bdf8976378
4 changed files with 30 additions and 50 deletions

View File

@@ -3,7 +3,7 @@ title: sukr
description: Minimal static site compiler — suckless, Rust, zero JS description: Minimal static site compiler — suckless, Rust, zero JS
--- ---
# Welcome to sukr # sukr
**sukr** transforms Markdown into high-performance static HTML. No bloated runtimes, no client-side JavaScript, just clean output. **sukr** transforms Markdown into high-performance static HTML. No bloated runtimes, no client-side JavaScript, just clean output.
@@ -17,24 +17,13 @@ Most static site generators punt rich content to the browser. sukr doesn't.
- **Flexible templates** — Runtime Tera templates, no recompilation needed. - **Flexible templates** — Runtime Tera templates, no recompilation needed.
- **Monorepo-ready** — Multiple sites via `-c` config flag. - **Monorepo-ready** — Multiple sites via `-c` config flag.
## Quick Start Ready to try it? Start with the [Getting Started](getting-started.html) guide.
```bash ## Learn More
# Install
git clone https://github.com/nrdxp/sukr
cd sukr
cargo install --path .
# Create site structure - [Getting Started](getting-started.html) — install sukr and build your first site
mkdir -p content templates static - [Configuration](configuration.html) — `site.toml` reference and CLI options
echo 'title = "My Site"' > site.toml - [Content Organization](content-organization.html) — how directories map to site structure
echo 'author = "Me"' >> site.toml - [Architecture](architecture.html) — how sukr works under the hood
echo 'base_url = "https://example.com"' >> site.toml
# Build Browse the **Features** section in the sidebar for syntax highlighting, math, diagrams, and more.
sukr
```
## Documentation
Browse the sidebar for detailed documentation on all features.

View File

@@ -42,6 +42,22 @@ A section is any directory containing `_index.md`. This file:
Directories without `_index.md` are ignored. Directories without `_index.md` are ignored.
## Section Discovery
sukr automatically discovers sections during the build:
1. Scans `content/` for directories containing `_index.md`
2. Collects all `.md` files in that directory (excluding `_index.md`)
3. Renders the section index template with the collected items
4. Renders individual content pages (for blog-type sections)
The **section type** determines which template renders the index. It resolves in order:
1. **Frontmatter override**`section_type: blog` in the section's `_index.md`
2. **Directory name**`content/blog/` becomes type `blog`
For the full section type reference (built-in types, frontmatter fields, and template dispatch), see [Sections](features/sections.html).
## Navigation Generation ## Navigation Generation
Navigation builds automatically from: Navigation builds automatically from:

View File

@@ -1,39 +1,14 @@
--- ---
title: Sections title: Sections
description: Automatic section discovery and processing description: Section types, frontmatter, and template dispatch reference
weight: 2 weight: 2
--- ---
sukr automatically discovers sections from your content directory structure. sukr discovers sections from your content directory structure. For an explanation of how sections work and how directories map to site structure, see [Content Organization](../content-organization.html).
## What is a Section?
A section is any directory under `content/` that contains an `_index.md` file:
```text
content/
├── _index.md # Homepage (not a section)
├── about.md # Standalone page
├── blog/ # ← This is a section
│ ├── _index.md # Section index
│ └── my-post.md # Section content
└── projects/ # ← This is also a section
├── _index.md
└── project-a.md
```
## Section Discovery
sukr automatically:
1. Scans `content/` for directories with `_index.md`
2. Collects all `.md` files in that directory (excluding `_index.md`)
3. Renders the section index template with the items
4. Renders individual content pages (for blog-type sections)
## Section Types ## Section Types
The section type determines which template is used. It's resolved in order: The section type determines which template is used. It resolves in order:
1. **Frontmatter override**: `section_type: blog` in `_index.md` 1. **Frontmatter override**: `section_type: blog` in `_index.md`
2. **Directory name**: `content/blog/` → type `blog` 2. **Directory name**: `content/blog/` → type `blog`

View File

@@ -70,9 +70,9 @@ None. All CHALLENGE questions resolved.
- [x] Add "view your site" final step to `getting-started.md` with expected output - [x] Add "view your site" final step to `getting-started.md` with expected output
2. **Phase 2: Structural Rework** — every page declares one quadrant, serves one audience 2. **Phase 2: Structural Rework** — every page declares one quadrant, serves one audience
- [ ] Rewrite `_index.md` as explanation quadrant (what sukr is, why it exists, link to tutorial) - [x] Rewrite `_index.md` as explanation quadrant (what sukr is, why it exists, link to tutorial)
- [ ] Slim `features/sections.md` to reference-only (section_type field, template dispatch) - [x] Slim `features/sections.md` to reference-only (section_type field, template dispatch)
- [ ] Move explanation content from `sections.md` into `content-organization.md` - [x] Move explanation content from `sections.md` into `content-organization.md`
- [ ] Add link to upstream Tera docs in `features/templates.md` - [ ] Add link to upstream Tera docs in `features/templates.md`
- [ ] Add defaults column to frontmatter table in `configuration.md` - [ ] Add defaults column to frontmatter table in `configuration.md`
- [ ] Add "Theming" section to `syntax-highlighting.md` (choosing/customizing themes) - [ ] Add "Theming" section to `syntax-highlighting.md` (choosing/customizing themes)