JS mockup engine for learning how to use Jekyll basics.
This is not a replacement for Jekyll — it just mocks up some of its behaviors:
- Liquid templating works (
include
andlink
tags work). - Markdown is rendered from
*.md
files. site
variable works in templates:site.time
= new Date();site.pages
= all pagessite.posts
= all postssite.related_posts
unsupportedsite.static_files
unsupportedsite.html_pages
unsupportedsite.collections
unsupported (planned)site.data
= all files in_data
folder (supports YAML and JSON)site.documents
unsupported (planned)site.categories.CATEGORY
unsupportedsite.tags.TAG
= all posts with tag TAG (specified in front matter)
page
variable works in templates:page.content
= page contentpage.title
= set in front matterpage.excerpt
= set in front matterpage.url
= automatically setpage.date
= set in front matter (or filename of a post)page.id
= set for posts and pages, both start at 0page.categories
unsupportedpage.tags
= set as an array in front matterpage.path
= path to filepage.next
= next post, last post hasnull
page.previous
= next post, first post hasnull
Javascript in a browser cannot walk the filesystem, hence a list of all content files needs to be mirrored as a YAML file mock/structure.yml
, e.g.:
- _posts:
- 2017-03-13-welcome-to-jekyll.md
- _includes:
- sidebar.md
- _layouts:
- default.html
- home.html
- post.html
- _config.yml
- about.md
- index.md
To view the mockup, just open index.html
via any server software (e.g Civetweb) pointed to the folder with Jekyll installation. Correct baseurl
has to be set in _config.yml
for the mockup to work. (When downloaded from releases page, it should work when placed right into the server root.)