create-berna-stencil 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@ Building a website from scratch involves a lot of moving parts: templating engin
12
12
  - 📁 **Scalable structure** — a clean, opinionated project layout that grows with your needs
13
13
  - 🌍 **Open source** — free to use, free to modify, free to share
14
14
 
15
- ![Version](https://img.shields.io/badge/version-2.3.0-blue)
15
+ ![Version](https://img.shields.io/badge/version-2.4.0-blue)
16
16
  ![License](https://img.shields.io/badge/license-Apache--2.0-blue)
17
17
  ![Eleventy](https://img.shields.io/badge/11ty-v3.1.2-black)
18
18
 
package/bin/create.js CHANGED
@@ -120,7 +120,7 @@ src/backend/config.php
120
120
 
121
121
  const PROJECT_PACKAGE = {
122
122
  name: path.basename(targetDir),
123
- version: '2.3.0',
123
+ version: '2.4.0',
124
124
  private: true,
125
125
  outputDir: 'out',
126
126
  "scripts": {
package/docs/Backend.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Backend
2
2
 
3
+ > **PHP requirement** — the backend runs only on servers with PHP support:
4
+ > - **Apache** (shared hosting, VPS) ✅
5
+ > - **Nginx** + PHP-FPM (VPS) ✅
6
+ > - **IIS** + FastCGI (Windows Server) ✅
7
+ > - **Static hosting** (Netlify, Vercel, GitHub Pages, Cloudflare Pages) ❌
8
+
3
9
  The backend is a PHP REST API located in `src/backend/`, copied to the output directory automatically at build time.
4
10
 
5
11
  ## Structure
@@ -30,9 +36,9 @@ return [
30
36
  'API_KEY' => 'default-key',
31
37
 
32
38
  // If you want restrict access to protected endpoints to specific clients, you can define custom keys for each endpoint
33
- // For subfolder endpoints, use the relative path ('subfolder/endpoint')
34
39
  'ENDPOINT_KEYS' => [
35
- 'example-protected' => 'custom-key',
40
+ // For subfolder endpoints, use the relative path ('subfolder/endpoint')
41
+ // 'subfolder/endpoint' => 'example-key',
36
42
  ],
37
43
 
38
44
  'DB_HOST' => '127.0.0.1',
package/docs/Deploy.md ADDED
@@ -0,0 +1,55 @@
1
+ # Server Configuration
2
+
3
+ Berna-Stencil includes ready-made server configuration for Apache and IIS. For Nginx, a reference config is provided in the project root.
4
+
5
+ ## Apache
6
+
7
+ `.htaccess` files at `src/frontend/` and `src/backend/` are automatically copied to the build output by Eleventy. No additional setup required.
8
+
9
+ Covers:
10
+ - Directory listing disabled
11
+ - 403 / 404 → `/404.html`
12
+ - Sensitive files blocked (`web.config`, dotfiles, etc.)
13
+ - `/api/*` → `backend/_core/index.php`
14
+ - HTTPS redirect
15
+
16
+ ## IIS
17
+
18
+ `web.config` files at `src/frontend/` and `src/backend/` are automatically copied to the build output by Eleventy. No additional setup required.
19
+
20
+ Covers the same rules as the Apache configuration above.
21
+
22
+ ## Nginx
23
+
24
+ Nginx does not support per-directory configuration files. The `nginx.conf` in the project root is a reference config that must be manually placed on the server.
25
+
26
+ ### Setup
27
+
28
+ 1. Copy `nginx.conf` to the server:
29
+ ```bash
30
+ scp nginx.conf user@server:/etc/nginx/sites-available/your-site
31
+ ```
32
+
33
+ 2. Edit `server_name` and `root` to match your environment:
34
+ ```nginx
35
+ server_name example.com;
36
+ root /var/www/html/out;
37
+ ```
38
+
39
+ 3. Add your SSL certificate paths.
40
+
41
+ 4. Enable and reload:
42
+ ```bash
43
+ ln -s /etc/nginx/sites-available/your-site /etc/nginx/sites-enabled/
44
+ nginx -t && systemctl reload nginx
45
+ ```
46
+
47
+ ### PHP-FPM socket
48
+
49
+ The default socket path in `nginx.conf` targets RHEL / Fedora systems. Adjust for your distro:
50
+
51
+ | Distro | Path |
52
+ |---|---|
53
+ | RHEL / Fedora | `unix:/run/php-fpm/php-fpm.sock` |
54
+ | Debian / Ubuntu | `unix:/run/php/php-fpm.sock` |
55
+ | TCP fallback | `127.0.0.1:9000` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-berna-stencil",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Eleventy boilerplate with per-page SCSS/JS pipeline, esbuild bundling, multi-framework CSS support and a built-in page management CLI",
5
5
  "keywords": [],
6
6
  "author": "Michele Garofalo",
@@ -6,9 +6,9 @@ return [
6
6
  'API_KEY' => 'DEFAULT_KEY',
7
7
 
8
8
  // If you want restrict access to protected endpoints to specific clients, you can define custom keys for each endpoint
9
- // For subfolder endpoints, use the relative path ('subfolder/endpoint')
10
9
  'ENDPOINT_KEYS' => [
11
- 'subfolder/example-protected' => 'example-key',
10
+ // For subfolder endpoints, use the relative path ('subfolder/endpoint')
11
+ // 'subfolder/endpoint' => 'example-key',
12
12
  ],
13
13
 
14
14
  // Database configuration
@@ -35,6 +35,10 @@
35
35
  <input type="radio" name="guide-filter" value="backend" />
36
36
  <span class="filter-pill">Backend</span>
37
37
  </label>
38
+ <label>
39
+ <input type="radio" name="guide-filter" value="deploy" />
40
+ <span class="filter-pill">Deploy</span>
41
+ </label>
38
42
  </div>
39
43
 
40
44
  <div class="tabs-container">
@@ -90,6 +94,9 @@
90
94
  <div id="content-backend" class="tab-content markdown-body">
91
95
  {% mdFile "docs/backend.md" %}
92
96
  </div>
97
+ <div id="content-deploy" class="tab-content markdown-body">
98
+ {% mdFile "docs/deploy.md" %}
99
+ </div>
93
100
 
94
101
  </div>
95
102
  </div>