GithubHelp home page GithubHelp logo

siathalysedi / marran.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from captaincanine/marran.com

0.0 3.0 0.0 364.13 MB

Jekyll website for marran.com

Home Page: http://www.marran.com

ApacheConf 0.02% HTML 54.76% Ruby 3.49% Makefile 0.47% CSS 21.40% JavaScript 19.86%

marran.com's Introduction

Marran.com

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.

License

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.

Site Search

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.

Flickr Integration

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.

Redirects

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.

Paginated Categories

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.

marran.com's People

Contributors

captaincanine avatar

Watchers

Arnstein Henriksen avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.