You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jerpy a small, zero-dependency, flat-file simple website system built for control and simplicity that is easy to install, customize, and maintain.
7
+
Jerpy a simple, extendable, flat-file simple website system built for control and ease-of-use that is easy to install, customize, and maintain.
8
8
9
-
Jerpy doesn't have a management interface or web portal (there *could* be a [plugin](#plugins) for that...). Everything is managed directly via the files themselves.
9
+
**NOTE: Jerpy isn't a traditional CMS and doesn't have a management interface or web portal (but there *could* be a [plugin](#plugins) for that...). Everything is managed directly via the files themselves.**
Stores layout templates, each their own `.php` file. The default global theme is set in `config.php` via the `$layout` property. The value is just the file name with no extension.
22
22
-## `assets`
23
-
Organize your CSS, JavaScript, fonts, and images to use in your layouts and pages via absolute URI here:
24
-
-## `media`
25
-
For any and all URL-accessible files, such as documents, video/music, etc.
23
+
Organize your CSS, JavaScript, fonts, and images to use in your layouts and pages via absolute URI here
26
24
-## `content`
27
25
For all your embedded content files, such as Markdown text files, and is not URL-accessible.
28
26
@@ -54,13 +52,13 @@ $routes = [
54
52
]
55
53
```
56
54
57
-
When implementing metadata, use the `@` warning suppression syntax to avoid warnings when a route does't have that metadata property specified:
55
+
When implementing metadata, use null coalescing syntax to avoid warnings when a route does't have that metadata property specified:
@@ -103,8 +101,23 @@ Plugins can be created to extend or add functionality to Jerpy. They do not requ
103
101
🗀 someSupportingPackage
104
102
```
105
103
106
-
Plugins can be included/required on a given page file as needed, or you can load it globally to be used on every page. To add a plugin, simply copy/upload the plugin's folder to the `plugins` directory. To enable a plugin globally, add it's folder name to the `$plugins` array in `config.php`.
104
+
## Enabling Plugins
105
+
Plugins can be included/required on a given page file as needed, or you can load it globally to be used on every page. To add a plugin, simply copy/upload the plugin's folder to the `plugins` directory.
107
106
107
+
To enable a plugin globally, add it's folder name to the `$plugins` array in `config.php`:
108
+
```php
109
+
$plugins = [
110
+
'md'
111
+
];
112
+
```
113
+
To enable a plugin only when a certain URI is matched, set a string key to check if the incoming URI starts with it:
114
+
```php
115
+
$plugins = [
116
+
'/admin' => 'admin' // only loaded when /admin* is requested
117
+
];
118
+
```
119
+
120
+
## Plugin Example
108
121
Below is an example plugin for using Parsedown via a wrapper method:
109
122
110
123
**NOTE: When including/requiring files within a plugin, make sure to use the `__DIR__` global to ensure PHP looks *within* the plugin directory and not in the root directory of the site**
0 commit comments