From ca6d87b8851ef0992877b4d37e41141b9fad584e Mon Sep 17 00:00:00 2001 From: Ruben Date: Sun, 8 Feb 2026 09:14:10 +0100 Subject: [PATCH] Update README with clearer structure and more concise explanations --- README.md | 68 +++++++++++++++---------------------------------------- 1 file changed, 18 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 4df260e..9f55bc6 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,45 @@ # FolderWeb -A PHP router that turns folders into websites — and a core you can build upon. Drop files in a directory, and they become pages. No database, no build process. +Drop markdown, HTML and PHP files in directories to instantly publish online. A simple concept that forms a stable core. No database, no build process, just the basic features to build highly custom websites on top off. -## How It Works +## How it works -Your file system is your site structure. Create folders, drop in content files, and they're live. +Your file system is your site structure. Create folders, drop in content files, and they're live. Create `content/about/intro.md` and it turns into `yoursite.com/about/`. Need more presentational controll then what Markdown offers? Drop in an HTML file. Dynamic content? Add a PHP script. No routing configuration, no build step, just save a file, refresh the browser. -``` -content/about/intro.md → yoursite.com/about/ -``` +Since everything is just files and folders, you can mount your site via SFTP or WebDAV and edit content directly from your local machine — save a file, and the change is live. Create websites like it's 1996! -No routing configuration. No frontmatter. No build step. Save a file, refresh the browser. +## Why mix formats? -Since everything is just files and folders, you can mount your site via SFTP or WebDAV and edit content directly from your local machine — save a file, and the change is live. - -## Mix Formats Freely - -A single page can combine Markdown, HTML, and PHP. Use each format where it fits best — Markdown for prose, HTML for layout, PHP for dynamic output. Number prefixes control the order: +Use each format where it fits best — Markdown for prose, HTML for layout, PHP for dynamic output. Number prefixes control the order and it all renderes to a single seamless page: ``` content/services/ -├── 10-intro.md # Markdown prose -├── 20-features.html # Structured HTML section -└── 30-pricing.php # Dynamic server-side output +├── 10-intro.md +├── 20-features.html +└── 30-pricing.php ``` -All three render as one page at `/services/`. +## Sane defaults -## Automatic Content Types +FolderWeb detects what kind of page to render based on your folder structure. A single page, like `content/about/` renders as a normal content page, while `content/blog/{posts}` renders as a list. -FolderWeb detects what kind of page to render based on your folder structure: +Cover images (`cover.jpg`), metadata (`metadata.ini`), and navigation are all convention-based. Almost nothing needs explicit configuration, but you have the option to so when you need control. -``` -content/about/ # Only files → renders as a page -content/blog/ # Has subdirectories → renders as a list -``` +## Build on top -Date prefixes in folder names are extracted automatically and stripped from URLs: +Build a `base.php` template with your own styles and custom features as plugins. Add multiple languages if you need it. -``` -content/blog/2025-03-15-my-post/ → /blog/my-post/ (date: March 15, 2025) -``` - -Cover images (`cover.jpg`), metadata (`metadata.ini`), and navigation are all convention-based. Almost nothing needs explicit configuration. - -## Customize Without Touching the Core - -The `custom/` directory overrides `app/default/` for everything — templates, styles, config, languages, and plugins: - -``` -custom/ -├── templates/ # Override any template -├── styles/ # Your CSS -├── plugins/ # Your plugins -├── languages/ # Translation overrides -└── config.ini # Configuration overrides -``` - -To update FolderWeb, pull the latest `app/`. Your customizations stay untouched. - -## What You Need +## Requirements - PHP 8.4+ - Apache with mod_rewrite -That's all. One dependency (Parsedown for Markdown). ~1,000 lines of core code. - ## Example Structure ``` project/ -├── app/ # Core (never modify) -├── content/ # Your content +├── app/ +├── content/ │ ├── front.md │ ├── about/ │ │ └── about.md @@ -87,7 +55,7 @@ project/ │ │ └── metadata.ini │ └── 2025-11-02-second-post/ │ └── post.md -└── custom/ # Your customizations +└── custom/ ├── templates/ ├── styles/ └── config.ini