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
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,26 @@ Jerpy is a simple, flat-file, PHP CMS built for control and simplicity that is e
6
6
7
7
The CMS was built to be as streamlined and stripped-down as possible, so it's meant to be administered directly via the files.
8
8
9
-
##Getting Started
9
+
# Getting Started
10
10
1. Grab the latest release and upload the files to your web root
11
11
2. Create a `layouts` and `pages` directory for your site content, and rename `config.sample.json` to `config.json`
12
12
3. Start creating!
13
13
14
-
##File Structure
14
+
# File Structure
15
15
There are 2 directories for content, `pages` and `layouts`, and just one file for configuration, `config.json`.
16
16
17
-
The `pages` directory stores the HTML/PHP content for the site, and can be used by setting the `page` property on a route to a page file path.
17
+
The `pages` directory stores all the content for the site, and can be referenced as a file path on the `page` property to render the page for a route.
18
18
19
19
The `layouts` directory stores layout templates and their assets. The default global theme is set in `config.json` on the `layout` property.
20
20
21
-
##Routes
21
+
# Routes
22
22
Routes are defined separately from pages to easily manage the content and access of each route.
23
23
24
24
Each route is defined as a key on the `routes` property in `config.json`, and value is an object whose properties define the route's metadata and page content.
25
25
26
26
There is an optional `layout` property to render the page with a different layout template than the global default, or without one at all by setting it to `false`.
27
27
28
-
##Layouts
28
+
# Layouts
29
29
Each layout directory must have a `index.php` file and an `assets` directory. You can organize your CSS, JavaScript, fonts, and images within the `assets` directory as you see fit.
30
30
31
31
A handful of global variables are available for use in the `index.php` of a layout:
@@ -44,10 +44,10 @@ A handful of global variables are available for use in the `index.php` of a layo
44
44
"routes": { // object: key->value store of all routes
45
45
"/": { // string: route URI
46
46
"title": "Home", // string: metadata title
47
-
// add any additional metadata/OpenGraph properties for SEO
47
+
// add any additional metadata/OpenGraph string properties for SEO (i.e., $page->meta->title in layout)
48
48
"page": "pages/home.php", // string: use this to render a page file (takes preference over body)
49
-
"body": "Hello, World!", // string: or use this to specify a raw response body (used if page not defined)
50
-
"layout": false// string|bool: used to override the default global layout; set to false for no template
49
+
"body": "Hello, World!", // string(optional): or use this to specify a raw response body (used if page not defined)
50
+
"layout": false// string|bool(optional): used to override the default global layout; set to false for no layout
0 commit comments