diff --git a/README.md b/README.md index c03dee6..1a67b85 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FolderWeb -**Just enough, nothing more.** Drop content files in folders, and they become pages. No database, no build process. +**Just enough, nothing more.** Drop Markdown files in folders, and they become pages. No database, no build process. ## What is FolderWeb? @@ -11,41 +11,38 @@ 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/` -- **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 +- **Multi-language support**: Built-in i18n with URL prefixes +- **Template system**: Override defaults with custom templates - **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/ # Application (never modify) +├── app/ # App (never modify) ├── content/ # Your website content │ ├── front.md # Home page -│ ├── about/ +│ ├── about/ # About page │ │ └── about-me.md -│ ├── portfolio/ -│ │ ├── 10-intro.md # Markdown prose -│ │ ├── 20-gallery.html # HTML layout -│ │ └── 30-stats.php # Dynamic PHP output -│ └── blog/ -│ ├── metadata.ini +│ └── blog/ # Blog with list view +│ ├── metadata.ini # Configure template │ ├── 2025-11-01-first-post/ │ │ ├── first-post.md │ │ ├── cover.jpg │ │ └── metadata.ini │ └── 2025-11-02-second-post/ -│ └── post.md +│ └── another-post.md └── custom/ # Your customizations - ├── templates/ - ├── styles/ - └── config.ini + ├── templates/ # Custom templates + ├── styles/ # Custom CSS + └── config.ini # Configuration ``` ## Documentation -Complete documentation available in [`docs/`](docs/). +**Complete documentation available in [`docs/`](docs/)** -Start with the **[Getting Started guide](docs/01-getting-started/index.md)** or browse the **[tutorial](docs/02-tutorial/)**. +## Learn More + +Start with the **[Getting Started Tutorial](docs/tutorial/00-getting-started.md)** or browse the **[complete documentation](docs/)**. diff --git a/devel/compose.yaml b/devel/compose.yaml index 506f507..0103721 100644 --- a/devel/compose.yaml +++ b/devel/compose.yaml @@ -1,6 +1,19 @@ version: '3.8' services: + # custom: + # image: php:8.3.12-apache + # container_name: folderweb-custom + # working_dir: /var/www/html/ + # volumes: + # - ../app:/var/www/app:z + # - ../content:/var/www/html:z + # - ../custom:/var/www/custom:z + # - ../docs:/var/www/html/docs:z + # - ./apache/custom.conf:/etc/apache2/conf-available/custom.conf:z + # ports: + # - "4040:80" + # command: bash -c "a2enconf custom && a2enmod rewrite && apache2-foreground" default: build: ./ container_name: folderweb-default diff --git a/docs/02-tutorial/01-adding-content.md b/docs/02-tutorial/01-adding-content.md index 3be5ad8..05a2fde 100644 --- a/docs/02-tutorial/01-adding-content.md +++ b/docs/02-tutorial/01-adding-content.md @@ -97,21 +97,19 @@ content/ ## Multiple Files in One Page -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:** +You can combine multiple content files in a single directory. They render in **alphabetical order**: ``` content/portfolio/ -├── 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 +├── 00-hero.php # Renders first +├── 01-intro.md # Renders second +├── 02-gallery.html # Renders third +└── 03-contact.md # Renders last ``` -All four files render as one page at `/portfolio/`. You can mix `.md`, `.html`, and `.php` freely — use whichever format fits each section best. +All four files render as one page at `/portfolio/`. -**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. +**Use case:** Build pages from modular components—header, content, footer, etc. ## Dates in Folder Names @@ -275,13 +273,13 @@ summary = "An introduction to my blog" ``` content/services/ -├── 10-hero.php -├── 20-intro.md -├── 30-pricing.html +├── 00-hero.php +├── 01-intro.md +├── 02-pricing.html └── metadata.ini ``` -All content files render together as one page at `/services/`, in number-prefix order. +All files render together as one page at `/services/`. ### Documentation Site