2026-02-07 19:14:13 +01:00
|
|
|
# Getting Started
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
## Requirements
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
- PHP 8.4+
|
|
|
|
|
- Apache with mod_rewrite
|
|
|
|
|
- A text editor
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
## Installation
|
2025-11-27 23:01:02 +01:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
git clone https://github.com/yourusername/folderweb.git
|
|
|
|
|
cd folderweb
|
|
|
|
|
cp -r app/default custom
|
|
|
|
|
mkdir content
|
|
|
|
|
```
|
|
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
## Local Development
|
2025-11-27 23:01:02 +01:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
cd devel
|
2026-02-07 19:14:13 +01:00
|
|
|
podman-compose up -d
|
2025-11-27 23:01:02 +01:00
|
|
|
```
|
|
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
Or with PHP's built-in server:
|
2025-11-27 23:01:02 +01:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
php -S localhost:8080 -t .
|
|
|
|
|
```
|
|
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
Visit `http://localhost:8080`.
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
## Your First Page
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
Create `content/hello.md`:
|
2025-11-27 23:01:02 +01:00
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
|
# Hello, World!
|
|
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
This is my first page.
|
2025-11-27 23:01:02 +01:00
|
|
|
```
|
|
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
Visit `http://localhost:8080/hello/`.
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
## Deploying to Shared Hosting
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
### Recommended Structure
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
Keep the framework and content outside the web root. Use symlinks to expose them:
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
```
|
|
|
|
|
/home/username/
|
2025-11-27 23:01:02 +01:00
|
|
|
├── folderweb/ # Git repo (not public)
|
|
|
|
|
│ ├── app/
|
|
|
|
|
│ └── custom/
|
|
|
|
|
├── content/ # Your content (not public)
|
2026-02-07 19:14:13 +01:00
|
|
|
└── public_html/ # Web root
|
|
|
|
|
├── app -> ../folderweb/app/
|
|
|
|
|
├── custom -> ../folderweb/custom/
|
|
|
|
|
└── content -> ../content/
|
2025-11-27 23:01:02 +01:00
|
|
|
```
|
|
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
To update FolderWeb, `git pull` in the repo directory.
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
### Apache
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
FolderWeb includes an `.htaccess` file that handles routing automatically. If your host requires manual configuration:
|
2025-11-27 23:01:02 +01:00
|
|
|
|
|
|
|
|
```apache
|
|
|
|
|
<Directory /path/to/public_html>
|
|
|
|
|
RewriteEngine On
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
|
RewriteRule ^(.*)$ /app/router.php [L,QSA]
|
|
|
|
|
</Directory>
|
|
|
|
|
```
|
|
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
## Next Steps
|
2025-11-27 23:01:02 +01:00
|
|
|
|
2026-02-07 19:14:13 +01:00
|
|
|
- [Adding content](../02-tutorial/01-adding-content.md) — Pages, metadata, and content formats
|
|
|
|
|
- [Styling](../02-tutorial/02-styling.md) — Customize the look
|
|
|
|
|
- [Templates](../02-tutorial/03-templates.md) — Control how content is presented
|