- {% endfor %}
-
-
- {{ content }}
-
-
-
-
-
-
-
-
-
-{% if site.data.project.google_analytics_tracking_id %}
-
-{% endif %}
-
-
-
diff --git a/doc/changelog.md b/doc/changelog.md
deleted file mode 100644
index a471991d..00000000
--- a/doc/changelog.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-layout: default
-permalink: changelog/
-title: Changelog
----
-
-Changelog
-=========
-
-All notable changes to this project will be documented in this file.
-
-{% for release in site.github.releases %}
-## [{{ release.name }}]({{ release.html_url }}) - {{ release.published_at | date: "%Y-%m-%d" }}
-{{ release.body | markdownify }}
-{% endfor %}
\ No newline at end of file
diff --git a/doc/config.toml b/doc/config.toml
new file mode 100644
index 00000000..8b7c1074
--- /dev/null
+++ b/doc/config.toml
@@ -0,0 +1,15 @@
+baseURL = "https://platesphp.com/"
+languageCode = "en-us"
+title = "Plates"
+
+pygmentsUseClasses = true
+
+googleAnalytics = "UA-46050814-2"
+
+[params]
+ tagline = "Native PHP Templates"
+ description = "Plates is a Twig inspired, native PHP template system that brings modern template language functionality to native PHP templates."
+ [params.images]
+ favicon = "favicon/favicon.ico"
+ appleTouch = "favicon/apple-touch-icon-precomposed.png"
+ logo = "images/logo.png"
\ No newline at end of file
diff --git a/doc/index.md b/doc/content/_index.md
similarity index 69%
rename from doc/index.md
rename to doc/content/_index.md
index 54e7aab5..54a5d65f 100644
--- a/doc/index.md
+++ b/doc/content/_index.md
@@ -1,11 +1,9 @@
----
-layout: default
-permalink: /
-title: Introduction
----
-
-Introduction
-============
++++
+title = "Introduction"
+[menu.main]
+parent = "getting-started"
+weight = 1
++++
[![Maintainer](http://img.shields.io/badge/maintainer-@ragboyjr-blue.svg?style=flat-square)](https://twitter.com/reinink)
[![Source Code](http://img.shields.io/badge/source-league/plates-blue.svg?style=flat-square)](https://github.com/thephpleague/plates)
@@ -22,15 +20,15 @@ Plates is a native PHP template system that's fast, easy to use and easy to exte
## Highlights
-- Native PHP templates, no new [syntax]({{ site.baseurl }}{% link templates/syntax.md %}) to learn
+- Native PHP templates, no new [syntax]({{< relref "templates/syntax.md" >}}) to learn
- Plates is a template system, not a template language
- Plates encourages the use of existing PHP functions
-- Increase code reuse with template [layouts]({{ site.baseurl }}{% link templates/layouts.md %}) and [inheritance]({{ site.baseurl }}{% link templates/inheritance.md %})
-- Template [folders]({{ site.baseurl }}{% link engine/folders.md %}) for grouping templates into namespaces
-- [Data]({{ site.baseurl }}/templates/data.md#preassigned-and-shared-data) sharing across templates
-- Preassign [data]({{ site.baseurl }}/templates/data#preassigned-and-shared-data) to specific templates
-- Built-in [escaping]({{ site.baseurl }}{% link templates/escaping.md %}) helpers
-- Easy to extend using [functions]({{ site.baseurl }}{% link engine/functions.md %}) and [extensions]({{ site.baseurl }}{% link engine/extensions.md %})
+- Increase code reuse with template [layouts]({{< relref "templates/layouts.md" >}}) and [inheritance]({{< relref "templates/inheritance.md" >}})
+- Template [folders]({{< relref "engine/folders.md" >}}) for grouping templates into namespaces
+- [Data]({{< relref "templates/data.md#preassigned-and-shared-data" >}}) sharing across templates
+- Preassign [data]({{< relref "templates/data#preassigned-and-shared-data" >}}) to specific templates
+- Built-in [escaping]({{< relref "templates/escaping.md" >}}) helpers
+- Easy to extend using [functions]({{< relref "engine/functions.md" >}}) and [extensions]({{< relref "engine/extensions.md" >}})
- Framework-agnostic, will work with any project
- Decoupled design makes templates easy to test
- Composer ready and PSR-2 compliant
diff --git a/doc/content/engine/_index.md b/doc/content/engine/_index.md
new file mode 100644
index 00000000..a6f8de99
--- /dev/null
+++ b/doc/content/engine/_index.md
@@ -0,0 +1,6 @@
++++
+title = "The Engine"
+[menu.main]
+identifier = "engine"
+weight = 2
++++
\ No newline at end of file
diff --git a/doc/engine/extensions.md b/doc/content/engine/extensions.md
similarity index 85%
rename from doc/engine/extensions.md
rename to doc/content/engine/extensions.md
index 84453474..7d206713 100644
--- a/doc/engine/extensions.md
+++ b/doc/content/engine/extensions.md
@@ -1,13 +1,12 @@
----
-layout: default
-permalink: engine/extensions/
-title: Extensions
----
++++
+title = "Extensions"
+linkTitle = "Engine Extensions"
+[menu.main]
+parent = "engine"
+weight = 5
++++
-Extensions
-==========
-
-Creating extensions couldn't be easier, and can really make Plates sing for your specific project. Start by creating a class that implements `\League\Plates\Extension\ExtensionInterface`. Next, register your template [functions]({{ site.baseurl }}{% link engine/functions.md %}) within a `register()` method.
+Creating extensions couldn't be easier, and can really make Plates sing for your specific project. Start by creating a class that implements `\League\Plates\Extension\ExtensionInterface`. Next, register your template [functions]({{< relref "engine/functions.md" >}}) within a `register()` method.
## Simple extensions example
@@ -41,7 +40,7 @@ To use this extension in your template, simply call your new functions:
Hello, =$this->e($this->uppercase($name))?>
~~~
-They can also be used in a [batch]({{ site.baseurl }}/templates/functions/#batch-function-calls) compatible function:
+They can also be used in a [batch]({{< relref "templates/functions.md#batch-function-calls" >}}) compatible function:
~~~ php
Hello =$this->e($name, 'uppercase')
@@ -87,7 +86,7 @@ To use this extension in your template, first call the primary function, then th
## Loading extensions
-To enable an extension, load it into the [engine]({{ site.baseurl }}{% link engine/index.md %}) object using the `loadExtension()` method.
+To enable an extension, load it into the [engine]({{< relref "engine/overview.md" >}}) object using the `loadExtension()` method.
~~~ php
$engine->loadExtension(new ChangeCase());
diff --git a/doc/engine/file-extensions.md b/doc/content/engine/file-extensions.md
similarity index 87%
rename from doc/engine/file-extensions.md
rename to doc/content/engine/file-extensions.md
index 613bccf4..e58023b4 100644
--- a/doc/engine/file-extensions.md
+++ b/doc/content/engine/file-extensions.md
@@ -1,11 +1,10 @@
----
-layout: default
-permalink: engine/file-extensions/
-title: File extensions
----
-
-File extensions
-===============
++++
+title = "File Extensions"
+linkTitle = "Engine File Extensions"
+[menu.main]
+parent = "engine"
+weight = 2
++++
Plates does not enforce a specific template file extension. By default it assumes `.php`. This file extension is automatically appended to your template names when rendered. You are welcome to change the default extension using one of the following methods.
diff --git a/doc/engine/folders.md b/doc/content/engine/folders.md
similarity index 93%
rename from doc/engine/folders.md
rename to doc/content/engine/folders.md
index 7991bfcd..c90bfb0b 100644
--- a/doc/engine/folders.md
+++ b/doc/content/engine/folders.md
@@ -1,11 +1,10 @@
----
-layout: default
-permalink: engine/folders/
-title: Folders
----
-
-Folders
-=======
++++
+title = "Folders"
+linkTitle = "Engine Folders"
+[menu.main]
+parent = "engine"
+weight = 3
++++
Folders make it really easy to organize and access your templates. Folders allow you to group your templates under different namespaces, each of which having their own file system path.
diff --git a/doc/engine/functions.md b/doc/content/engine/functions.md
similarity index 50%
rename from doc/engine/functions.md
rename to doc/content/engine/functions.md
index 87b95f89..cb9941be 100644
--- a/doc/engine/functions.md
+++ b/doc/content/engine/functions.md
@@ -1,13 +1,12 @@
----
-layout: default
-permalink: engine/functions/
-title: Functions
----
++++
+title = "Functions"
+linkTitle = "Engine Functions"
+[menu.main]
+parent = "engine"
+weight = 4
++++
-Functions
-=========
-
-While [extensions]({{ site.baseurl }}{% link engine/extensions.md %}) are awesome for adding additional reusable functionality to Plates, sometimes it's easier to just create a one-off function for a specific use case. Plates makes this easy to do.
+While [extensions]({{< relref "engine/extensions.md" >}}) are awesome for adding additional reusable functionality to Plates, sometimes it's easier to just create a one-off function for a specific use case. Plates makes this easy to do.
## Registering functions
@@ -27,7 +26,7 @@ To use this function in a template, simply call it like any other function:
Hello =$this->e($this->uppercase($name))
~~~
-It can also be used in a [batch]({{ site.baseurl }}/templates/functions/#batch-function-calls) compatible function:
+It can also be used in a [batch]({{< relref "templates/functions#batch-function-calls">}}) compatible function:
~~~ php
Hello =$this->e($name, 'uppercase')
diff --git a/doc/engine/index.md b/doc/content/engine/overview.md
similarity index 92%
rename from doc/engine/index.md
rename to doc/content/engine/overview.md
index fe0365be..b7db2ff3 100644
--- a/doc/engine/index.md
+++ b/doc/content/engine/overview.md
@@ -1,11 +1,11 @@
----
-layout: default
-permalink: engine/
-title: The Engine
----
-
-The Engine
-==========
++++
+title = "Overview"
+linkTitle = "Engine Overview"
+aliases = ["/engine"]
+[menu.main]
+parent = "engine"
+weight = 1
++++
Plates uses a central object called the `Engine`, which is used to store the environment configuration, functions and extensions. It helps decouple your templates from the file system and other dependencies. For example, if you want to change the folder where your templates are stored, you can do so by simply changing the path in one location.
diff --git a/doc/content/extensions/_index.md b/doc/content/extensions/_index.md
new file mode 100644
index 00000000..bfe10071
--- /dev/null
+++ b/doc/content/extensions/_index.md
@@ -0,0 +1,6 @@
++++
+title = "Extensions"
+[menu.main]
+identifier = "extensions"
+weight = 4
++++
\ No newline at end of file
diff --git a/doc/extensions/asset.md b/doc/content/extensions/asset.md
similarity index 95%
rename from doc/extensions/asset.md
rename to doc/content/extensions/asset.md
index 6a1d40e6..9d7d05f7 100644
--- a/doc/extensions/asset.md
+++ b/doc/content/extensions/asset.md
@@ -1,11 +1,9 @@
----
-layout: default
-permalink: extensions/asset/
-title: Asset extension
----
-
-Asset
-=====
++++
+title = "Asset"
+[menu.main]
+parent = "extensions"
+weight = 1
++++
The asset extension can be used to quickly create "cache busted" asset URLs in your templates. This is particularly helpful for aggressively cached files that can potentially change in the future, such as CSS files, JavaScript files and images. It works by appending the timestamp of the file's last update to its URL. For example, `/css/all.css` becomes `/css/all.1373577602.css`. As long as the file does not change, the timestamp remains the same and caching occurs. However, if the file is changed, a new URL is automatically generated with a new timestamp, and visitors receive the new file.
diff --git a/doc/extensions/community.md b/doc/content/extensions/community.md
similarity index 84%
rename from doc/extensions/community.md
rename to doc/content/extensions/community.md
index 139dc09d..6282d3a4 100644
--- a/doc/extensions/community.md
+++ b/doc/content/extensions/community.md
@@ -1,10 +1,9 @@
----
-layout: default
-permalink: extensions/community/
-title: Community Extensions
----
-
-# Community Extensions
++++
+title = "Community"
+[menu.main]
+parent = "extensions"
+weight = 3
++++
This is a list of all the known community extensions for the Plates library. Please feel free to submit a [Pull Request](https://github.com/thephpleague/plates) to add your extension to this list.
diff --git a/doc/extensions/uri.md b/doc/content/extensions/uri.md
similarity index 96%
rename from doc/extensions/uri.md
rename to doc/content/extensions/uri.md
index e18c2060..1f3be1a2 100644
--- a/doc/extensions/uri.md
+++ b/doc/content/extensions/uri.md
@@ -1,11 +1,9 @@
----
-layout: default
-permalink: extensions/uri/
-title: URI extension
----
-
-URI
-===
++++
+title = "URI"
+[menu.main]
+parent = "extensions"
+weight = 2
++++
The URI extension is designed to make URI checks within templates easier. The most common use is marking the current page in a menu as "selected". It only has one function, `uri()`, but can do a number of helpful tasks depending on the parameters passed to it.
diff --git a/doc/content/getting-started/_index.md b/doc/content/getting-started/_index.md
new file mode 100644
index 00000000..19d0b831
--- /dev/null
+++ b/doc/content/getting-started/_index.md
@@ -0,0 +1,6 @@
++++
+title = "Getting Started"
+[menu.main]
+identifier = "getting-started"
+weight = 1
++++
\ No newline at end of file
diff --git a/doc/installation.md b/doc/content/getting-started/installation.md
similarity index 89%
rename from doc/installation.md
rename to doc/content/getting-started/installation.md
index ba7a2b63..69a8401b 100644
--- a/doc/installation.md
+++ b/doc/content/getting-started/installation.md
@@ -1,11 +1,9 @@
----
-layout: default
-permalink: installation/
-title: Installation
----
-
-Installation
-============
++++
+title = "Installation"
+[menu.main]
+parent = "getting-started"
+weight = 3
++++
## Using Composer
diff --git a/doc/simple-example.md b/doc/content/getting-started/simple-example.md
similarity index 88%
rename from doc/simple-example.md
rename to doc/content/getting-started/simple-example.md
index 35f9b71d..ad7a52bc 100644
--- a/doc/simple-example.md
+++ b/doc/content/getting-started/simple-example.md
@@ -1,11 +1,9 @@
----
-layout: default
-permalink: simple-example/
-title: Simple example
----
-
-Simple example
-==============
++++
+title = "Simple Example"
+[menu.main]
+parent = "getting-started"
+weight = 2
++++
Here is a simple example of how to use Plates. We will assume the following directory stucture:
diff --git a/doc/content/templates/_index.md b/doc/content/templates/_index.md
new file mode 100644
index 00000000..19f973fd
--- /dev/null
+++ b/doc/content/templates/_index.md
@@ -0,0 +1,6 @@
++++
+title = "Templates"
+[menu.main]
+identifier = "templates"
+weight = 3
++++
\ No newline at end of file
diff --git a/doc/templates/data.md b/doc/content/templates/data.md
similarity index 91%
rename from doc/templates/data.md
rename to doc/content/templates/data.md
index 09e5571f..4330eed4 100644
--- a/doc/templates/data.md
+++ b/doc/content/templates/data.md
@@ -1,11 +1,10 @@
----
-layout: default
-permalink: templates/data/
-title: Data
----
-
-Data
-====
++++
+title = "Data"
+linkTitle = "Templates Data"
+[menu.main]
+parent = "templates"
+weight = 2
++++
It's very common to share application data (variables) with a template. Data can be whatever you want: strings, arrays, objects, etc. Plates allows you set both template specific data as well as shared template data.
@@ -30,7 +29,7 @@ $template->data(['name' => 'Jonathan']);
## Accessing data
-Template data is available as locally scoped variables at the time of rendering. Continuing with the example above, here is how you would [escape]({{ site.baseurl }}{% link templates/escaping.md %}) and output the "name" value in a template:
+Template data is available as locally scoped variables at the time of rendering. Continuing with the example above, here is how you would [escape]({{< relref "templates/escaping.md" >}}) and output the "name" value in a template:
~~~ php
Hello =$this->e($name)?>
diff --git a/doc/templates/escaping.md b/doc/content/templates/escaping.md
similarity index 89%
rename from doc/templates/escaping.md
rename to doc/content/templates/escaping.md
index b3368c54..8cb44b29 100644
--- a/doc/templates/escaping.md
+++ b/doc/content/templates/escaping.md
@@ -1,11 +1,10 @@
----
-layout: default
-permalink: templates/escaping/
-title: Escaping
----
-
-Escaping
-========
++++
+title = "Escaping"
+linkTitle = "Templates Escaping"
+[menu.main]
+parent = "templates"
+weight = 8
++++
Escaping is a form of [data filtering](http://www.phptherightway.com/#data_filtering) which sanitizes unsafe, user supplied input prior to outputting it as HTML. Plates provides two shortcuts to the `htmlspecialchars()` function.
@@ -20,7 +19,7 @@ Escaping is a form of [data filtering](http://www.phptherightway.com/#data_filte
## Batch function calls
-The escape functions also support [batch]({{ site.baseurl }}/templates/functions/#batch-function-calls) function calls, which allow you to apply multiple functions, including native PHP functions, to a variable at one time.
+The escape functions also support [batch]({{< relref "templates/functions.md#batch-function-calls" >}}) function calls, which allow you to apply multiple functions, including native PHP functions, to a variable at one time.
~~~ php
diff --git a/doc/templates/functions.md b/doc/content/templates/functions.md
similarity index 76%
rename from doc/templates/functions.md
rename to doc/content/templates/functions.md
index 37ca2492..ba41bdb7 100644
--- a/doc/templates/functions.md
+++ b/doc/content/templates/functions.md
@@ -1,11 +1,10 @@
----
-layout: default
-permalink: templates/functions/
-title: Functions
----
-
-Functions
-=========
++++
+title = "Functions"
+linkTitle = "Templates Functions"
+[menu.main]
+parent = "templates"
+weight = 3
++++
Template functions in Plates are accessed using the `$this` pseudo-variable.
@@ -16,7 +15,7 @@ Template functions in Plates are accessed using the `$this` pseudo-variable.
## Custom fuctions
-In addition to the functions included with Plates, it's also possible to add [one-off functions]({{ site.baseurl }}{% link engine/functions.md %}), or even groups of functions, known as [extensions]({{ site.baseurl }}{% link engine/extensions.md %}).
+In addition to the functions included with Plates, it's also possible to add [one-off functions]({{< relref "engine/functions.md" >}}), or even groups of functions, known as [extensions]({{< relref "engine/extensions.md" >}}).
## Batch function calls
@@ -30,7 +29,7 @@ Sometimes you need to apply more than function to a variable in your templates.
~~~
-The [escape]({{ site.baseurl }}{% link templates/escaping.md %}) functions also support batch function calls.
+The [escape]({{< relref "templates/escaping.md" >}}) functions also support batch function calls.
~~~ php
diff --git a/doc/templates/inheritance.md b/doc/content/templates/inheritance.md
similarity index 62%
rename from doc/templates/inheritance.md
rename to doc/content/templates/inheritance.md
index 89d65c1b..ede2be2a 100644
--- a/doc/templates/inheritance.md
+++ b/doc/content/templates/inheritance.md
@@ -1,18 +1,16 @@
----
-layout: default
-permalink: templates/inheritance/
-title: Inheritance
----
-
-Inheritance
-===========
-
-By combining [layouts]({{ site.baseurl }}{% link templates/layouts.md %}) and [sections]({{ site.baseurl }}{% link templates/sections.md %}), Plates allows you to "build up" your pages using predefined sections. This is best understand using an example:
++++
+title = "Inheritance"
+linkTitle = "Templates Inheritance"
+[menu.main]
+parent = "templates"
+weight = 7
++++
+By combining [layouts]({{< relref "templates/layouts.md" >}}) and [sections]({{< relref "templates/sections.md" >}}), Plates allows you to "build up" your pages using predefined sections. This is best understand using an example:
## Inheritance example
-The following example illustrates a pretty standard website. Start by creating a site template, which includes your header and footer as well as any predefined content [sections]({{ site.baseurl }}{% link templates/sections.md %}). Notice how Plates makes it possible to even set default section content, in the event that a page doesn't define it.
+The following example illustrates a pretty standard website. Start by creating a site template, which includes your header and footer as well as any predefined content [sections]({{< relref "templates/sections.md" >}}). Notice how Plates makes it possible to even set default section content, in the event that a page doesn't define it.
template.php
~~~ php
@@ -40,7 +38,7 @@ The following example illustrates a pretty standard website. Start by creating a