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 (
includeandlinktags work). - Markdown is rendered from
*.mdfiles. sitevariable works in templates:site.time= new Date();site.pages= all pagessite.posts= all postssite.related_postsunsupportedsite.static_filesunsupportedsite.html_pagesunsupportedsite.collectionsunsupported (planned)site.data= all files in_datafolder (supports YAML and JSON)site.documentsunsupported (planned)site.categories.CATEGORYunsupportedsite.tags.TAG= all posts with tag TAG (specified in front matter)
pagevariable 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.categoriesunsupportedpage.tags= set as an array in front matterpage.path= path to filepage.next= next post, last post hasnullpage.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.)