Forked from the original Pattern-Primer for PHP by adactio (Jeremy Keith)
Inspired by Ruby (Sinatra) version
This is a design communication, testing and process tool.
Create little snippets of markup and save them to the âpatterns folderâ (called _posts in Jekyll). The pattern primer will generate a list of all the patterns in that folder. You will see the pattern rendered as HTML. You will also see the source displayed in a textarea.
Why not? I wanted to implement the a version of Pattern-Primer for my Jekyll projects with only Jekyll dependencies (and no PHP dependencies). It can be built locally with a Jekyll/Ruby environment or uploaded as a static directory on a remote server â here is an example of that. If anything, this tiny effort proves that you can build things other than hacker blogs with Jekyll.
_config.yml
file, change baseurl: '/Pattern-Primer-Jekyll'
to baseurl: ''
_posts
folder.jekyll serve
and open localhost:4000 in your browser.user.github.io
(user = your GH username)._posts
folder._config.yml
file, change baseurl: '/Pattern-Primer-Jekyll'
to baseurl: ''
Master
branch, create a new branch and call it gh-pages
.http://user.github.io/
_posts
folder._config.yml
file, change baseurl: '/Pattern-Primer-Jekyll'
to baseurl: '/projectname'
Master
branch, create a new branch and call it gh-pages
.http://user.github.io/projectname
Learn all about Jekyll on GitHub Pages
One quirk of using this in Jekyll (or at least the quick way I created it) is that the patterns are stored in the â_postsâ folder. Every post must have identical front matter that looks like this:
---
layout: pattern
---
⌠and each file must be named yyyy-mm-dd-title.html
. The date tag is arbitrary, but this will determine where it appears in order on the index. The default is set to 0001-01-01 for the packaged HTML snippets, but anything named newer than that will appear at the bottom of the list.
http://patternprimer.olivermak.es/
Note: my version uses the standard styles written by adactio.
The original Pattern Primer is by adactio and should be used if you prefer PHP or arenât already using Jekyll. Many thanks to Jeremy for this great tool!