A Jekyll template with pjax support
JavaScript CSS HTML Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_includes
_layouts
_posts
_site
css
js
snippets
.htaccess
README.md
_config.yml
about.md
contact.md
index.md
pjaxify.sh

README.md

Jekyll pjax

This Jekyll template is designed to work with pjax. Quick instructions:

  • Build your Jekyll site as normal
  • Run pjaxkify.sh
  • Do what you will with your site that's now in the _site folder.

That's it.

The important bits

_includes/snippet.html This is the layout that's used to render the content for a page without the header and footer chrome.

snippets/* This is where the HTML snippets, called by pjax and inserted into the designated element, are stored.

.htaccess This will tell the server to use the snippets instead of the full pages when the HTTP_X_PJAX header is present. Otherwise, the pages are loaded as normal.

How to use this

pjaxify.sh

After you've setup your Jekyll blog, run this script as you might normally run Jekyll. It will go through all of the pages, copy them to the snippets folder and replace the layout in the front matter with "snippets" so that they're rendered appropriately. Once this is done it will run Jekyll, creating the site the in _site folder as normal, and copy the .htaccess file there.