Skip to content

Commit

Permalink
Initial Docs #168
Browse files Browse the repository at this point in the history
- Built system for deploying multiple versions of docs
- Moved docs to doc folder

Signed-off-by: RJ Garcia <rj@bighead.net>
  • Loading branch information
ragboyjr committed Jan 20, 2018
1 parent 6ab9127 commit 0cf47ea
Show file tree
Hide file tree
Showing 37 changed files with 456 additions and 23 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
build
composer.lock
vendor
docs/_site
doc/_site
doc/_data/versions.yml
.generated
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
.PHONY: test test-coverage test-coverage-clover
.PHONY: test test-coverage test-coverage-clover serve-generated-docs deploy-docs docs

test:
./vendor/bin/peridot test
test-coverage:
./vendor/bin/peridot --code-coverage-path=build/coverage -r spec -r html-code-coverage test
test-coverage-clover:
./vendor/bin/peridot --code-coverage-path=build/coverage -r spec -r clover-code-coverage test
docs:
php scripts/build-docs.php docs-config.json
serve-generated-docs:
php -S 127.0.0.1:4000 -t .generated
deploy-docs:
git checkout gh-pages
cp -r .generated/* .
git add -A; git commit -sm 'Deploying docs for Plates'
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Plates
======

**DISCLAIMER: v4 is in active development and is not in a shippable state yet**

[![Maintainer](http://img.shields.io/badge/maintainer-@ragboyjr-blue.svg?style=flat-square)](https://twitter.com/ragboyjr)
[![Source Code](http://img.shields.io/badge/source-league/plates-blue.svg?style=flat-square)](https://github.com/thephpleague/plates)
[![Latest Version](https://img.shields.io/github/release/thephpleague/plates.svg?style=flat-square)](https://github.com/thephpleague/plates/releases)
Expand All @@ -18,15 +16,18 @@ Plates is a native PHP template system that's fast, easy to use and easy to exte

- Native PHP templates, no new [syntax](http://platesphp.com/templates/syntax/) to learn
- Plates is a template system, not a template language
- Plates encourages the use of existing PHP functions
- Plates encourages the use of existing PHP functions and conventions
- Increase code reuse with template [layouts](http://platesphp.com/templates/layouts/) and [inheritance](http://platesphp.com/templates/inheritance/)
- Template [folders](http://platesphp.com/engine/folders/) for grouping templates into namespaces
- [Data](http://platesphp.com/templates/data/#preassigned-and-shared-data) sharing across templates
- Preassign [data](http://platesphp.com/templates/data/#preassigned-and-shared-data) to specific templates
- Built-in [escaping](http://platesphp.com/templates/escaping/) helpers
- Easy to extend using [functions](http://platesphp.com/engine/functions/) and [extensions](http://platesphp.com/engine/extensions/)
- Simple design crafted for extendability - most features are built as extensions
- Everything is customizable, don't like the behavior of something, you can change it
- Composable naming strategies allowing relative templates, folders, and dynamic base paths.
- Framework-agnostic, will work with any project
- Decoupled design makes templates easy to test
- Supports non-php file rendering for img or svg files to include in your templates.
- Composer ready and PSR-2 compliant

## Installation
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions doc/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
238 changes: 238 additions & 0 deletions doc/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.9)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.7.1)
ruby-enum (~> 0.5)
concurrent-ruby (1.0.5)
ethon (0.11.0)
ffi (>= 1.3.0)
execjs (2.7.0)
faraday (0.13.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.18)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (172)
activesupport (= 4.2.9)
github-pages-health-check (= 1.3.5)
jekyll (= 3.6.2)
jekyll-avatar (= 0.5.0)
jekyll-coffeescript (= 1.0.2)
jekyll-commonmark-ghpages (= 0.1.3)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.9.2)
jekyll-gist (= 1.4.1)
jekyll-github-metadata (= 2.9.3)
jekyll-mentions (= 1.2.0)
jekyll-optional-front-matter (= 0.3.0)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.2.0)
jekyll-redirect-from (= 0.12.1)
jekyll-relative-links (= 0.5.2)
jekyll-remote-theme (= 0.2.3)
jekyll-sass-converter (= 1.5.0)
jekyll-seo-tag (= 2.3.0)
jekyll-sitemap (= 1.1.1)
jekyll-swiss (= 0.4.0)
jekyll-theme-architect (= 0.1.0)
jekyll-theme-cayman (= 0.1.0)
jekyll-theme-dinky (= 0.1.0)
jekyll-theme-hacker (= 0.1.0)
jekyll-theme-leap-day (= 0.1.0)
jekyll-theme-merlot (= 0.1.0)
jekyll-theme-midnight (= 0.1.0)
jekyll-theme-minimal (= 0.1.0)
jekyll-theme-modernist (= 0.1.0)
jekyll-theme-primer (= 0.5.2)
jekyll-theme-slate (= 0.1.0)
jekyll-theme-tactile (= 0.1.0)
jekyll-theme-time-machine (= 0.1.0)
jekyll-titles-from-headings (= 0.5.0)
jemoji (= 0.8.1)
kramdown (= 1.14.0)
liquid (= 4.0.0)
listen (= 3.0.6)
mercenary (~> 0.3)
minima (= 2.1.1)
rouge (= 2.2.1)
terminal-table (~> 1.4)
github-pages-health-check (1.3.5)
addressable (~> 2.3)
net-dns (~> 0.8)
octokit (~> 4.0)
public_suffix (~> 2.0)
typhoeus (~> 0.7)
html-pipeline (2.7.1)
activesupport (>= 2)
nokogiri (>= 1.4)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
jekyll (3.6.2)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-avatar (0.5.0)
jekyll (~> 3.0)
jekyll-coffeescript (1.0.2)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.1.0)
commonmarker (~> 0.14)
jekyll (>= 3.0, < 4.0)
jekyll-commonmark-ghpages (0.1.3)
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1)
rouge (~> 2)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.9.2)
jekyll (~> 3.3)
jekyll-gist (1.4.1)
octokit (~> 4.2)
jekyll-github-metadata (2.9.3)
jekyll (~> 3.1)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.2.0)
activesupport (~> 4.0)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-optional-front-matter (0.3.0)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.2.0)
jekyll (~> 3.0)
jekyll-redirect-from (0.12.1)
jekyll (~> 3.3)
jekyll-relative-links (0.5.2)
jekyll (~> 3.3)
jekyll-remote-theme (0.2.3)
jekyll (~> 3.5)
rubyzip (>= 1.2.1, < 3.0)
typhoeus (>= 0.7, < 2.0)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-seo-tag (2.3.0)
jekyll (~> 3.3)
jekyll-sitemap (1.1.1)
jekyll (~> 3.3)
jekyll-swiss (0.4.0)
jekyll-theme-architect (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-cayman (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-dinky (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-hacker (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-leap-day (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-merlot (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-midnight (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-minimal (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-modernist (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-primer (0.5.2)
jekyll (~> 3.5)
jekyll-github-metadata (~> 2.9)
jekyll-seo-tag (~> 2.2)
jekyll-theme-slate (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-tactile (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-time-machine (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.0)
jekyll (~> 3.3)
jekyll-watch (1.5.1)
listen (~> 3.0)
jemoji (0.8.1)
activesupport (~> 4.0, >= 4.2.9)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0)
kramdown (1.14.0)
liquid (4.0.0)
listen (3.0.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
mercenary (0.3.6)
mini_portile2 (2.3.0)
minima (2.1.1)
jekyll (~> 3.3)
minitest (5.11.1)
multipart-post (2.0.0)
net-dns (0.8.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
octokit (4.8.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.1)
forwardable-extended (~> 2.6)
public_suffix (2.0.5)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.2.1)
ruby-enum (0.7.1)
i18n
rubyzip (1.2.1)
safe_yaml (1.0.4)
sass (3.5.5)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.4)
thread_safe (~> 0.1)
unicode-display_width (1.3.0)

PLATFORMS
ruby

DEPENDENCIES
github-pages

BUNDLED WITH
1.16.1
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docsv3/_data/project.yml → doc/_data/project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Plates
tagline: Native PHP Templates
description: 'Plates is a Twig inspired, native PHP template system that brings modern template language functionality to native PHP templates.'
google_analytics_tracking_id: UA-46050814-2
google_analytics_tracking_id: UA-46050814-2
38 changes: 31 additions & 7 deletions docsv3/_layouts/default.html → doc/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@
{% if site.data.project.description %}
<meta name="description" content="{{ site.data.project.description }}">
{% endif %}
{% if site.github.url %}
{% if site.github.url and jekyll.environment == "production" %}
<base href="{{ site.github.url }}">
{% endif %}
{% if site.data.images.favicon %}
<link rel="icon" type="image/x-icon" href="{{ site.data.images.favicon }}" />
<link rel="icon" type="image/x-icon" href="/{{ site.data.versions.current_version }}{{ site.data.images.favicon }}" />
{% else %}
<link rel="icon" type="image/x-icon" href="http://theme.thephpleague.com/img/favicon.ico" />
{% endif %}
{% if site.data.images.apple_touch %}
<link rel="apple-touch-icon-precomposed" href="{{ site.data.images.apple_touch }}">
<link rel="apple-touch-icon-precomposed" href="/{{ site.data.versions.current_version }}{{ site.data.images.apple_touch }}">
{% else %}
<link rel="apple-touch-icon-precomposed" href="http://theme.thephpleague.com/img/apple-touch-icon-precomposed.png">
{% endif %}
<link rel="stylesheet" href="http://theme.thephpleague.com/css/all.css">
<link rel="stylesheet" href="/css/custom.css">
<link rel="stylesheet" href="/{{ site.data.versions.current_version }}/css/custom.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
</head>
<body>

Expand All @@ -48,7 +49,7 @@ <h2>Our Packages:</h2>
<a class="logo" href="/">
{% if site.data.images.logo %}
<span class="icon">
<img src="{{ site.data.images.logo }}" width="50" height="40" alt="{{ site.data.project.title }} - {{ site.data.project.tagline }}">
<img src="/{{ site.data.versions.current_version }}{{ site.data.images.logo }}" width="50" height="40" alt="{{ site.data.project.title }} - {{ site.data.project.tagline }}">
</span>
{% endif %}
<span class="name">{{ site.data.project.title }}</span>
Expand All @@ -67,12 +68,27 @@ <h2>Our Packages:</h2>

<main>
<menu>
{% if site.data.versions %}
<div class="version-select">
<select class="version-select select2" style="width: 100%" data-minimum-results-for-search="5">
{% for version in site.data.versions.versions %}
{% if version[0] == site.data.versions.current_version %}
<option value="{{ version[0] }}" selected="selected">
{% else %}
<option value="{{ version[0] }}">
{% endif %}
{{ version[1] }}
</option>
{% endfor %}
</select>
</div>
{% endif %}
{% for section in site.data.menu %}
<h2>{{ section[0] }}</h2>
<ul>
{% for link in section[1] %}
<li {% if page.url == link[1] %}class="selected"{% endif %}>
<a href="{{ link[1] }}">{{ link[0] }}</a>
<a href="/{{ site.data.versions.current_version }}{{ link[1] }}">{{ link[0] }}</a>
</li>
{% endfor %}
</ul>
Expand All @@ -91,6 +107,14 @@ <h2>{{ section[0] }}</h2>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://theme.thephpleague.com/js/scripts.js"></script>
<script src="http://theme.thephpleague.com/js/prism.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
<script>
$('select.select2').select2().on('change', function(e) {
var pathParts = window.location.pathname.split("/");
pathParts[1] = e.currentTarget.value;
window.location.href = pathParts.join("/");
});
</script>

{% if site.data.project.google_analytics_tracking_id %}
<script>
Expand All @@ -104,4 +128,4 @@ <h2>{{ section[0] }}</h2>
{% endif %}

</body>
</html>
</html>
File renamed without changes
File renamed without changes.
Loading

0 comments on commit 0cf47ea

Please sign in to comment.