Permalink
Browse files

ommited extensions

  • Loading branch information...
1 parent 7ba55dd commit 5d1f4430e7d1b0afe364b0134edfe0d23c209778 @JCB-K committed Apr 12, 2012
Showing with 98 additions and 0 deletions.
  1. +20 −0 LICENSE
  2. +78 −0 README
View
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2012 Jacob Klapwijk, http://jcbk.me/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
78 README
@@ -0,0 +1,78 @@
+# Singlepage-Jekyll
+
+A simple Jekyll plugin to make content load dynamically using pagify.js.
+
+## Description
+
+Pagify.js is a great jQuery plugin to make simple one-page websites, with content loading dynamically. The only problem with it is that you have to define every page you want to load manually. This is fine for a static page, but it get's in the way when you're hosting a website with regularly updated content. This plugin aims to solve that.
+
+It generates a JSON file of all your pages, which you can pass to pagify.js.
+
+## Usage
+
+### Files
+
+Place "singlepage-jekyll.rb" in _plugins, "root" in _includes, and jquery-min.js and pagify.js in your website root. Install ruby-json:
+
+```
+gem install ruby
+```
+
+### Setup
+
+Create a layout in _layouts, such as default.html. Load Pagify and jQuery:
+
+``` html
+<script src="jquery.min.js" type="text/javascript"></script>
+<script src="pagify.js" type="text/javascript"></script>
+```
+
+Then go on and add the following:
+
+```html
+<body>
+{% include root %}
+{{ content }}
+</body>
+```
+
+Create a page with the layout default. Create a div that will contain page content:
+
+``` html
+<div id='page_holder' />
+```
+
+Call __pagify__ on the aforementioned div and pass in options. _The only required option is `pages`._
+
+``` js
+$.getJSON('html.json', function(data) {
+ $('#page_holder').pagify({
+ pages: data,
+ default: 'home'
+ });
+});
+```
+
+Link to other pages by linking to hashes of their page names:
+
+``` html
+<a href='#contact'>Contact</a>
+<a href='#about'>About</a>
+```
+Or like this:
+
+```html
+{% for post in site.posts %}
+<a href="#{{ post.id }}">{{ post.title }}</a>
+{% endfor %}
+```
+
+All the pages you want to call don't need a layout, as their content will just be loaded within a div on the page. To learn more about the options of pagify.js, check out [it's Github page](http://github.com/cmPolis/Pagify).
+
+### Everything else
+
+This is just a first version. Feel free to improve and send a pull request.
+
+Made by [Jacob Klapwijk](http://jcbk.me).
+
+MIT licensed.

0 comments on commit 5d1f443

Please sign in to comment.