Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 08d288604c40f00152c8619a5bbcb000f3a28512 curtis committed Dec 3, 2011
Showing with 565 additions and 0 deletions.
  1. +21 −0 LICENSE
  2. +118 −0 README.md
  3. +1 −0 VERSION
  4. +21 −0 _layouts/portfolio.html
  5. +35 −0 _layouts/profile.html
  6. +35 −0 _layouts/project.html
  7. +72 −0 _layouts/team.html
  8. +19 −0 _projects/sample-project.yml
  9. +19 −0 _team/sample-person.yml
  10. +80 −0 portfolio.rb
  11. +12 −0 read_more.rb
  12. +16 −0 simple_format.rb
  13. +116 −0 team.rb
21 LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2011 Flatterline LLC
+
+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.
118 README.md
@@ -0,0 +1,118 @@
+# Jekyll Plugins
+
+This is a collection of plugins for the Jekyll static site generator. You can see these plugins in use on the [flatterline.com](http://flatterline.com) website.
+
+## Overview
+
+This repository includes the following plugins:
+
+* **portfolio.rb** - A plugin for generating a portfolio page and individual
+ project pages.
+
+* **read_more.rb** - A plugin for generating a link to read more for post
+ index pages.
+
+* **simple_format.rb** - A plugin for formatting a block of text very
+ simply.
+
+* **team.rb** - A plugin for generating a team page, individual profile
+ pages and a Liquid filter for short author bios on blog posts.
+
+## Usage
+
+### Company Portfolio
+
+Need to create a portfolio page for your company website? Look no further!
+
+Simply define data files in the `_projects` directory and this plugin will read those, create a portfolio index and a page for each project. Then all you need to do is style them :)
+
+See the sample pages for possible layouts and data file format:
+
+* [_layouts/portfolio.html](https://github.com/flatterline/jekyll-plugins/blob/master/_layouts/portfolio.html)
+
+* [_layouts/project.html](https://github.com/flatterline/jekyll-plugins/blob/master/_layouts/project.html)
+
+* [_projects/sample-project.yml](https://github.com/flatterline/jekyll-plugins/blob/master/_projects/sample-project.yml)
+
+### Read More for Blog Posts
+
+This is a very simple Liquid Template filter to create a nofollow, "read more" link for blog posts. It is intended to be used on blog index pages after an excerpt. For example:
+
+`{% if post.excerpt %}
+ {{ post.excerpt | read_more: post.url }}
+{% endif %}`
+
+might produce something like:
+
+`This is our custom blog post excerpt.<a href="/blog/2011/01/01/a-blog-post" rel="nofollow" class="read-more">read more »</a>`
+
+**Note:** For SEO purposes you should always have a unique excerpt for each post that is used on the index page.
+
+### Simple Format
+
+This is a very simple Liquid Template filter to mimic the Rails simple_format method. It will perform the following transformations:
+
+* \r\n and \r -> \n
+* 2+ newline -> paragraph
+* 1 newline -> br
+
+Using our example from before:
+
+`{% if post.excerpt %}
+ {{ post.excerpt | read_more: post.url | simple_format }}
+{% endif %}`
+
+might produce something like:
+
+`<p>This is our custom blog post excerpt.<a href="/blog/2011/01/01/a-blog-post" rel="nofollow" class="read-more">read more »</a></p>`
+
+### Company Team
+
+Need to create a team page for your company website? Look no further!
+
+Simply define data files in the `_team` directory and this plugin will read those, create a team index and a page for each team member. Then all you need to do is style them :)
+
+See the sample pages for possible layouts and data file format:
+
+* [_layouts/team.html](https://github.com/flatterline/jekyll-plugins/blob/master/_layouts/team.html)
+
+* [_layouts/profile.html](https://github.com/flatterline/jekyll-plugins/blob/master/_layouts/profile.html)
+
+* [_team/sample-person.yml](https://github.com/flatterline/jekyll-plugins/blob/master/_team/sample-person.yml)
+
+This plugin also includes a Liquid Template tag for an author bio to include on a blog post page. Add an author to your YAML Front Matter for each post, like so:
+
+`author: Sample Person`
+
+Then use the tag on your post layout:
+
+`{% authors %}`
+
+**Note:** The author name will be converted to the YML file name, so the file names need to follow a format that you use for your author names. The general formula is:
+
+* Convert author to downcase
+* Replace all spaces with dashes
+* Append .yml
+
+e.g., Sample Person -> sample-person.yml
+
+## Requirements
+
+* Ruby >= 1.9.2
+
+## Note on Patches/Pull Requests
+
+Did we miss something? Is there a bug?
+
+* Fork the project.
+* Make your feature addition or bug fix.
+* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
+* Send us a pull request.
+
+## Author
+
+Written by [Curtis Miller](http://millarian.com) of Flatterline, a [Ruby on Rails development company](http://flatterline.com).
+
+## Copyright
+
+Copyright (c) 2011 Flatterline LLC. See LICENSE for details.
@@ -0,0 +1 @@
+0.0.1
@@ -0,0 +1,21 @@
+---
+layout: page
+title: Sample Portfolio Layout
+---
+<div class="span16">
+ <h1>Our Portfolio</h1>
+
+ <ul id="projects">
+ {% for project in page.projects %}
+ <li class="project span5">
+ <a href="/portfolio/{{ project[0] }}">
+ {% if project[1].image %}
+ <img src="{{ project[1].image.url }}" title="{{ project[1].image.title }}" alt="{{ project[1].image.alt }}" />
+ {% endif %}
+
+ <p>{{ project[1].short }}</p>
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+</div>
@@ -0,0 +1,35 @@
+---
+layout: page
+---
+<div id="profile" class="row">
+ <div class="span4">
+ {% if page.image %}
+ <div id="profile-photo">
+ <img src="{{ page.image.url }}" title="{{ page.image.title }}" alt="{{ page.image.alt }}" width="200" height="200" />
+ </div>
+ {% endif %}
+ </div>
+
+ <div class="span11">
+ <h1>
+ {{ page.name }}
+ <small>{{ page.role }}</small>
+ </h1>
+
+ {{ page.bio }}
+
+ <ul>
+ {% if page.linkedin %}
+ <li><a href="http://www.linkedin.com/in/{{ page.linkedin }}">Connect on LinkedIn</a></li>
+ {% endif %}
+
+ {% if page.twitter %}
+ <li><a href="http://twitter.com/{{ page.twitter }}">Follow on Twitter</a></li>
+ {% endif %}
+
+ {% if page.github %}
+ <li><a href="http://github.com/{{ page.github }}">Follow on GitHub</a></li>
+ {% endif %}
+ </ul>
+ </div>
+</div>
@@ -0,0 +1,35 @@
+---
+layout: page
+---
+{% if page.image %}
+ <div class="span5 logo">
+ <img src="{{ page.image.url }}" title="{{ page.image.title }}" alt="{{ page.image.alt }}" />
+ </div>
+{% endif %}
+
+<div class="span10">
+ <h1>{{ page.title }}</h1>
+ <p>{{ page.description }}</p>
+
+ {% if page.website %}
+ <div class="website"><a href="{{ page.website }}">{{ page.website }}</a></div>
+ {% endif %}
+</div>
+
+<div id="project-description" class="span16">
+ <h3>What we did for {{ page.title }}:</h3>
+ {{ page.project_description }}
+</div>
+
+{% if page.endorsements %}
+ <div id="endorsements" class="span16">
+ <h3>What {{ page.title }} had to say about us:</h3>
+
+ {% for endorsement in page.endorsements %}
+ <blockquote>
+ {{ endorsement.body }}
+ <small>{{ endorsement.from }}, {{ endorsement.role }}</small>
+ </blockquote>
+ {% endfor %}
+ </div>
+{% endif %}
@@ -0,0 +1,72 @@
+---
+layout: page
+title: Sample Team Layout
+---
+
+<div id="team-page">
+ {% if page.team['employee'] %}
+ <h2>Core Team Members</h2>
+
+ <ul class="team row">
+ {% for person in page.team['employee'] %}
+ <li class="person span3">
+ <a href="/team/{{ person[0] }}">
+ {% if person[1].image %}
+ <img src="{{ person[1].image.url }}" title="{{ person[1].image.title }}" alt="{{ person[1].image.alt }}" width="150" />
+ {% endif %}
+
+ <p>
+ {{ person[1].name }}
+ <br />
+ <small>{{ person[1].role }}</small>
+ </p>
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+
+ {% if page.team['contractor'] %}
+ <h2>Awesome People We Work With</h2>
+
+ <ul class="team row">
+ {% for person in page.team['contractor'] %}
+ <li class="person span3">
+ <a href="/team/{{ person[0] }}">
+ {% if person[1].image %}
+ <img src="{{ person[1].image.url }}" title="{{ person[1].image.title }}" alt="{{ person[1].image.alt }}" width="150" />
+ {% endif %}
+
+ <p>
+ {{ person[1].name }}
+ <br />
+ <small>{{ person[1].role }}</small>
+ </p>
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+
+ {% if page.team['alumni'] %}
+ <h2>Alumni</h2>
+
+ <ul class="team row">
+ {% for person in page.team['alumni'] %}
+ <li class="person span3">
+ <a href="/team/{{ person[0] }}">
+ {% if person[1].image %}
+ <img src="{{ person[1].image.url }}" title="{{ person[1].image.title }}" alt="{{ person[1].image.alt }}" width="150" />
+ {% endif %}
+
+ <p>
+ {{ person[1].name }}
+ <br />
+ <small>{{ person[1].role }}</small>
+ </p>
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+</div>
@@ -0,0 +1,19 @@
+description:
+ This is a sample project description.
+endorsements:
+-
+ body:
+ Working with this company was great!
+ from: Endorser Name
+ role: Project Manager
+image:
+ url: /images/sample-project.jpg
+ title: Sample Project
+ alt: Sample Project
+layout: project
+project_description:
+ We did this project.
+published: true
+short: This is a sample short description.
+title: Sample Project
+website: http://sampleproject.com/
@@ -0,0 +1,19 @@
+active: true
+bio:
+ This is a sample person's bio.
+email: sample@person.com
+github: sampleperson
+image:
+ url: /images/sample-person.jpg
+ title: Sample Person
+ alt: Sample Person
+ attribution:
+layout: profile
+linkedin: sampleperson
+name: Sample Person
+role: Founder & CEO
+short:
+ <a href="/team/sample-person">Sample Person</a> is the founder and CEO of the company.
+twitter: sampleperson
+type: employee
+website: http://sampleperson.com/
Oops, something went wrong.

0 comments on commit 08d2886

Please sign in to comment.