New features
This commit is contained in:
parent
4b782856e2
commit
b3c8f15363
|
@ -1,3 +1,5 @@
|
||||||
|
AddDefaultCharset UTF-8
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
|
|
@ -11,20 +11,24 @@ Admin area / GUI.
|
||||||
|
|
||||||
## Advanced mode
|
## Advanced mode
|
||||||
You can make new post editing the filesystem.
|
You can make new post editing the filesystem.
|
||||||
- Create a directory on /content/posts/
|
- Create a directory on `/content/posts/`
|
||||||
- The directory name is the uri for the new post
|
- The directory name is the uri for the new post
|
||||||
- Create a new file called index.txt inside of the new directory
|
- Create a new file called `index.txt` inside of the new directory
|
||||||
- Edit the file index.txt
|
- Edit the file `index.txt`
|
||||||
- Add two variables, Tite: and Content:
|
- Add two variables, Tite: and Content:
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
- Create the directory /content/posts/test
|
- Create the directory `/content/posts/test`
|
||||||
- Create the file index.txt on /content/posts/test/index.txt
|
- Create the file `index.txt` on `/content/posts/test/index.txt`
|
||||||
- Edit the file index.txt
|
- Edit the file `index.txt`
|
||||||
- Add the variables
|
- Add the variables
|
||||||
|
|
||||||
```
|
```
|
||||||
Title: New post test
|
Title: New post test
|
||||||
|
|
||||||
Content:
|
Content:
|
||||||
This is an example of a new post, hello world!
|
Hello Lorem
|
||||||
|
It is a long establishedfact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
|
||||||
|
|
||||||
|
It is a long establishedfact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
title: Variables for post
|
title: Variables for posts and pages
|
||||||
content:
|
content:
|
||||||
|
|
||||||
There are many fields/variables to make a post. Each field ends on two dots(:).
|
There are many fields/variables to make a post or a page. Each field ends on two dots(:).
|
||||||
|
|
||||||
The last field needs to be Content:.
|
The last field needs to be Content:.
|
||||||
|
|
||||||
- Title: the title for the post.
|
- Title: the title for the post/page.
|
||||||
- Status: with this field you can change bettewen published and draft.
|
- Status: with this field you can change bettewen published and draft.
|
||||||
- Unixstamp: you can define the publish time/date in unix time stamp, this need to be in UTF-0.
|
- Unixstamp: you can define the publish time/date in unix time stamp, this need to be in UTC-0/GMT.
|
||||||
- Username: the owner username. Needs to be a valid username.
|
- Username: the owner username. Needs to be a valid username.
|
||||||
- Author: the author's name.
|
- Author: the author's name.
|
||||||
- Content: the content for the post, support HTML and Markdown code.
|
- Content: the content for the post/page, support HTML and Markdown code.
|
||||||
|
|
||||||
### Post example
|
### Post example
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,7 +3,7 @@ Content:
|
||||||
You only need a Webserver with PHP support.
|
You only need a Webserver with PHP support.
|
||||||
|
|
||||||
- PHP 5.3 or higher.
|
- PHP 5.3 or higher.
|
||||||
- PHP module [mbstring](http://php.net/manual/en/book.mbstring.php) for UTF-8 full support.
|
- PHP module [mbstring](http://php.net/manual/en/book.mbstring.php) for full UTF-8 support.
|
||||||
- Webserver:
|
- Webserver:
|
||||||
* Apache with module [mod_rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html)
|
* Apache with module [mod_rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html)
|
||||||
* Ngnix with module [ngx_http_rewrite_module](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html)
|
* Ngnix with module [ngx_http_rewrite_module](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html)
|
|
@ -1,9 +1,20 @@
|
||||||
Title: Variables for themes
|
Title: Theme variables
|
||||||
|
|
||||||
Content:
|
Content:
|
||||||
|
|
||||||
## Object $Site
|
## $pages arrays
|
||||||
The object $Site have all the information from the database /content/databases/site.php.
|
This array cotains all pages published. Each item from the array is a `Page Object`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Array $posts
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Site object
|
||||||
|
The object Site have all the information from the database /content/databases/site.php.
|
||||||
|
|
||||||
|
By default there is an object $Site, whith the next methods.
|
||||||
|
|
||||||
Print the site title
|
Print the site title
|
||||||
<pre><code data-language="php">echo $Site->title();</code></pre>
|
<pre><code data-language="php">echo $Site->title();</code></pre>
|
||||||
|
@ -11,7 +22,21 @@ Print the site title
|
||||||
Print the site slogan
|
Print the site slogan
|
||||||
<pre><code data-language="php">echo $Site->slogan();</code></pre>
|
<pre><code data-language="php">echo $Site->slogan();</code></pre>
|
||||||
|
|
||||||
## Object $Page
|
---
|
||||||
|
|
||||||
|
## Page object
|
||||||
|
|
||||||
|
By default if the user filter by a particular page there will be an object $Page. To check if the user is filtering by a page you can uses the object $Url and the method `whereAmI()`.
|
||||||
|
<pre><code data-language="php">if( $Url->whereAmI()==='page' )
|
||||||
|
{
|
||||||
|
echo 'The page filtered is '.$Page->title();
|
||||||
|
}
|
||||||
|
{
|
||||||
|
echo 'The user is not watching a particular page';
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
And here there are the methods for the object $Page.
|
||||||
|
|
||||||
Print the page title
|
Print the page title
|
||||||
<pre><code data-language="php">echo $Page->title();</code></pre>
|
<pre><code data-language="php">echo $Page->title();</code></pre>
|
||||||
|
|
|
@ -18,7 +18,7 @@ define('PATH_BOOT', PATH_ROOT.'kernel/boot/');
|
||||||
define('PATH_RULES', PATH_ROOT.'kernel/boot/rules/');
|
define('PATH_RULES', PATH_ROOT.'kernel/boot/rules/');
|
||||||
define('PATH_HELPERS', PATH_ROOT.'kernel/helpers/');
|
define('PATH_HELPERS', PATH_ROOT.'kernel/helpers/');
|
||||||
|
|
||||||
define('PATH_CONTENT', PATH_ROOT.'content/');
|
define('PATH_CONTENT', PATH_ROOT.'gitcontent/en_EN/');
|
||||||
define('PATH_POSTS', PATH_CONTENT.'posts/');
|
define('PATH_POSTS', PATH_CONTENT.'posts/');
|
||||||
define('PATH_PAGES', PATH_CONTENT.'pages/');
|
define('PATH_PAGES', PATH_CONTENT.'pages/');
|
||||||
define('PATH_DATABASES', PATH_CONTENT.'databases/');
|
define('PATH_DATABASES', PATH_CONTENT.'databases/');
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
<p>Themes</p>
|
<p>Themes</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="./content/how-to-make-a-post">Making a basic theme</a></li>
|
<li><a href="./content/how-to-make-a-post">Making a basic theme</a></li>
|
||||||
<li><a href="./content/how-to-make-a-post">Constants and Variables</a></li>
|
<li><a href="../../themes/variables">Theme variables</a></li>
|
||||||
<li><a href="./content/how-to-make-a-post">Objects for themes</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<p>Plugins</p>
|
<p>Plugins</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
Loading…
Reference in New Issue