Update README with clearer structure and more concise explanations

This commit is contained in:
Ruben 2026-02-08 09:14:10 +01:00
parent 134846b84c
commit ca6d87b885

View file

@ -1,77 +1,45 @@
# FolderWeb # 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.
``` 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!
content/about/intro.md → yoursite.com/about/
```
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. 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:
## 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:
``` ```
content/services/ content/services/
├── 10-intro.md # Markdown prose ├── 10-intro.md
├── 20-features.html # Structured HTML section ├── 20-features.html
└── 30-pricing.php # Dynamic server-side output └── 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.
``` ## Build on top
content/about/ # Only files → renders as a page
content/blog/ # Has subdirectories → renders as a list
```
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.
``` ## Requirements
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
- PHP 8.4+ - PHP 8.4+
- Apache with mod_rewrite - Apache with mod_rewrite
That's all. One dependency (Parsedown for Markdown). ~1,000 lines of core code.
## Example Structure ## Example Structure
``` ```
project/ project/
├── app/ # Core (never modify) ├── app/
├── content/ # Your content ├── content/
│ ├── front.md │ ├── front.md
│ ├── about/ │ ├── about/
│ │ └── about.md │ │ └── about.md
@ -87,7 +55,7 @@ project/
│ │ └── metadata.ini │ │ └── metadata.ini
│ └── 2025-11-02-second-post/ │ └── 2025-11-02-second-post/
│ └── post.md │ └── post.md
└── custom/ # Your customizations └── custom/
├── templates/ ├── templates/
├── styles/ ├── styles/
└── config.ini └── config.ini