This directory contains data for my website, marran.com.
The site is built with Jekyll because I got tired of using Drupal and wanted something fast, smart, and geeky. I know get to boast that my site is entirely static. Jekyll was created by Tom Preston-Werner.
The following directories and their contents are copyrighted by me, Keith Marran, unless otherwise mentioned. You may not reuse anything in them without my permission:
- blog/
- recipes/
- travel/
- images/
Everything else is up for grabs, but please don’t blatantly copy the look-and-feel.
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.
One of the big limitations I had with Jekyll was trying to implement a site-search. I really didn’t want to employ Google Site Search. So I implemented a generator for Jekyll that creates JSON site indexes. I plan on writing more up about this, but for now, take a look at /_plugins/generate_searchindex.rb and /js/site-search.js.
I have a lot of photos on my site and needed to easily integrate with Flickr. I created a generator for Flickr photosets and a couple of filters for easy formatting. You can check it out at /_plugins/flickr.rb.
I moved my site from Drupal and didn’t want to lose all the SEO and have broken links. I used the method laid out by Matt Di Pasquale to create redirect pages. I made a modification in that I created a generator that creates redirect pages if a post has one or more “redirect” items in its YAML data. You can see the code in /_plugins/generate_redirects.rb.
I needed to break my site into basic buckets of content: blog, recipes, travel, and tech. I am using “categories” to break the content into those buckets. I needed the index pages of those categories to be paginated and I needed the index pages to have their own templates. I created a plugin called “CategoryPagination” to do that.
For CategoryPagination to work, the following items need to be true:
- There is a file called “category_index.html” in the _layouts directory
- In the _config.yml, there needs to be a line that says “pagination: true”
- There needs to be an “index.html” page with “category: category-name” in the YAML front matter. Be sure to use the actual category name.
For instance, if you wanted to have a paginated set of pages for all posts in the “recipes” category, place a file called “index.html” in the “recipes” directory. Make sure that in the YAML front matter, there is a line that says “category: recipes”.
This plugin is structured so that each category index page can have its own unique landing page. For instance, a page showing all the recipes can be different than the page showing all the blog entries. Subsequent pages (page 2 of the recipes, for example), use the category_index.html template. This is by design. Perhaps someday I’ll add a parameter to the index page to specify which template to use for sub-pages.
I have created a custom filter for displaying previous and next links on category pages.