From e7e360005dff7975a8e328a6d75b0544795039ac Mon Sep 17 00:00:00 2001 From: Ruben Date: Sat, 7 Feb 2026 18:59:41 +0100 Subject: [PATCH] Update documentation for mixed content formats and ordering Clarify that content files can be Markdown, HTML, or PHP Add explanation of numbered prefixes for file ordering Update example structures to reflect new capabilities Standardize documentation links and formatting --- README.md | 35 +++++++++++++++------------ docs/02-tutorial/01-adding-content.md | 24 +++++++++--------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 1a67b85..c03dee6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FolderWeb -**Just enough, nothing more.** Drop Markdown files in folders, and they become pages. No database, no build process. +**Just enough, nothing more.** Drop content files in folders, and they become pages. No database, no build process. ## What is FolderWeb? @@ -11,38 +11,41 @@ FolderWeb is a content publishing framework where your file system is your conte ## Key Features - **File-based routing**: `content/blog/post/` → `yoursite.com/blog/post/` -- **Multi-language support**: Built-in i18n with URL prefixes -- **Template system**: Override defaults with custom templates +- **Multiple content formats**: Write in Markdown, HTML, or PHP — and mix them freely within the same page. Use Markdown for prose, HTML for structured sections, and PHP when you need dynamic output. Prefix filenames with numbers (`10-intro.md`, `20-gallery.html`) to control render order. +- **Template system**: Override any default template with your own +- **Multi-language support**: Built-in i18n with URL prefixes and per-file translations - **Modern CSS**: CSS variables, nesting, OKLCH colors, grid layouts -- **No build process**: Save and refresh—see changes immediately +- **No build process**: Save and refresh — see changes immediately ## Example Structure ``` project/ -├── app/ # App (never modify) +├── app/ # Application (never modify) ├── content/ # Your website content │ ├── front.md # Home page -│ ├── about/ # About page +│ ├── about/ │ │ └── about-me.md -│ └── blog/ # Blog with list view -│ ├── metadata.ini # Configure template +│ ├── portfolio/ +│ │ ├── 10-intro.md # Markdown prose +│ │ ├── 20-gallery.html # HTML layout +│ │ └── 30-stats.php # Dynamic PHP output +│ └── blog/ +│ ├── metadata.ini │ ├── 2025-11-01-first-post/ │ │ ├── first-post.md │ │ ├── cover.jpg │ │ └── metadata.ini │ └── 2025-11-02-second-post/ -│ └── another-post.md +│ └── post.md └── custom/ # Your customizations - ├── templates/ # Custom templates - ├── styles/ # Custom CSS - └── config.ini # Configuration + ├── templates/ + ├── styles/ + └── config.ini ``` ## Documentation -**Complete documentation available in [`docs/`](docs/)** +Complete documentation available in [`docs/`](docs/). -## Learn More - -Start with the **[Getting Started Tutorial](docs/tutorial/00-getting-started.md)** or browse the **[complete documentation](docs/)**. +Start with the **[Getting Started guide](docs/01-getting-started/index.md)** or browse the **[tutorial](docs/02-tutorial/)**. diff --git a/docs/02-tutorial/01-adding-content.md b/docs/02-tutorial/01-adding-content.md index 05a2fde..3be5ad8 100644 --- a/docs/02-tutorial/01-adding-content.md +++ b/docs/02-tutorial/01-adding-content.md @@ -97,19 +97,21 @@ content/ ## Multiple Files in One Page -You can combine multiple content files in a single directory. They render in **alphabetical order**: +You can combine multiple content files in a single directory. They render as a single page, combined in filename order. + +**Prefix filenames with numbers to control the order:** ``` content/portfolio/ -├── 00-hero.php # Renders first -├── 01-intro.md # Renders second -├── 02-gallery.html # Renders third -└── 03-contact.md # Renders last +├── 10-hero.php # Renders first — dynamic PHP banner +├── 20-intro.md # Renders second — Markdown prose +├── 30-gallery.html # Renders third — HTML layout +└── 40-contact.md # Renders last — Markdown form ``` -All four files render as one page at `/portfolio/`. +All four files render as one page at `/portfolio/`. You can mix `.md`, `.html`, and `.php` freely — use whichever format fits each section best. -**Use case:** Build pages from modular components—header, content, footer, etc. +**Why number prefixes?** Files are sorted using natural sort (`strnatcmp`), so `10-` comes before `20-` comes before `30-`. Using increments of 10 leaves room to insert new sections later without renaming existing files. Files without a number prefix sort after numbered files. ## Dates in Folder Names @@ -273,13 +275,13 @@ summary = "An introduction to my blog" ``` content/services/ -├── 00-hero.php -├── 01-intro.md -├── 02-pricing.html +├── 10-hero.php +├── 20-intro.md +├── 30-pricing.html └── metadata.ini ``` -All files render together as one page at `/services/`. +All content files render together as one page at `/services/`, in number-prefix order. ### Documentation Site