Code Monkey home page Code Monkey logo

octopress-tag-pages's Introduction

README

Octopress plugin to generate tag pages. Based upon the jekyll category page generator plugin by Dave Perrett.

Version: 0.4

Getting Started

Put tag_generator.rb in the /plugins folder. Then add the tag_index.html file to /source/_layouts. Some additional files are provided in /source/_layouts and /source/_includes to demonstrate basic usage. This plugin can be paired with an octopress tag cloud plugin to create tag clouds.

Usage

Included filters :

  • tag_links: Outputs the list of tags as comma-separated <a> links.
  • date_to_html_string: Outputs the post.date as formatted html, with hooks for CSS styling.

Available _config.yml settings :

  • tag_dir: The subfolder to build tag pages in (default is tags).
  • tag_title_prefix: The string used before the tag name in the page title (default is Tag: ).

License

Copyright (c) 2012 Robby Edwards, http://robbyedwards.com/ Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)

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.

octopress-tag-pages's People

Contributors

vyper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

octopress-tag-pages's Issues

I'd like tagging pages too

I'd like tagging pages too.

It is possible to make the plugin count the tags declared in page's (not only post) yaml front?

Best,
Tarin

tags link to wrong page

All generated tags are just linking to $tag and not to http://$domain/tags/$tag
where can I change this?
thx

Bullet missing before tags in byline

When you add tags there is no separator between them and the date/categories in the byline. I added a bit of code to the source/stylesheets/screen.css to rectify this, if you're interested in putting that in your README.

.tags:before{content:"\2022 ";padding:0 .4em 0 .4em;display:inline-block}#content

You need to put it after the categories line in the CSS.

Build Warning: Layout 'nil' requested in tags/.../atom.xml does not exist.

Running:

$ rake generate

the plugins warns, for each tag declared in posts, with the following message:

## Generating Site with Jekyll
    write source/stylesheets/screen.css
Configuration file: ... /octopress/_config.yml
            Source: source
       Destination: public
      Generating... 
     Build Warning: Layout 'nil' requested in tags/foo_tag/atom.xml does not exist.
     Build Warning: Layout 'nil' requested in tags/bar_tag/atom.xml does not exist.
     ...

The rss works fine so the warning is only an annoying useless one.

Can only use one tag

layout: post
title: "Hello World"
date: 2013-07-29 20:12
comments: true
categories: [Misc, Hello World]
description: Hello World
tags: Misc

This works fine, but if add another tag, like the categories above:
tags: [Misc, HelloWorld]
when rake generate I got Build Failed
Liquid Exception: comparison of Array with Array failed in page

full info is below:

## Generating Site with Jekyll
�[31m�[0m�[32midentical�[0m source/stylesheets/screen.css 
Configuration from /home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/_config.yml
Building site: source -> public
Liquid Exception: comparison of Array with Array failed in page
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/tag_cloud.rb:76:in `sort!'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/tag_cloud.rb:76:in `render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:94:in `block in render_all'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `collect'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `render_all'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:82:in `render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/template.rb:124:in `render'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/include_array.rb:45:in `block (3 levels) in render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/context.rb:91:in `stack'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/include_array.rb:44:in `block (2 levels) in render'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/include_array.rb:39:in `chdir'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/include_array.rb:39:in `block in render'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/include_array.rb:34:in `each'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/include_array.rb:34:in `render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:94:in `block in render_all'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `collect'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `render_all'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/tags/if.rb:39:in `block (2 levels) in render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/tags/if.rb:37:in `each'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/tags/if.rb:37:in `block in render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/context.rb:91:in `stack'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/tags/if.rb:36:in `render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:94:in `block in render_all'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `collect'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `render_all'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/tags/unless.rb:16:in `block in render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/context.rb:91:in `stack'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/tags/unless.rb:11:in `render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:94:in `block in render_all'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `collect'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `render_all'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:82:in `render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/template.rb:124:in `render'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/template.rb:132:in `render!'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/convertible.rb:101:in `do_layout'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/post_filters.rb:167:in `do_layout'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/page.rb:100:in `render'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/category_generator.rb:93:in `write_category_index'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/category_generator.rb:111:in `block in write_category_indexes'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/category_generator.rb:110:in `each'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/category_generator.rb:110:in `write_category_indexes'
/home/twtwtw/Projects/Websites/Cryo-Nyx.Blog/plugins/category_generator.rb:139:in `generate'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:190:in `block in generate'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:189:in `each'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:189:in `generate'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:40:in `process'
/home/twtwtw/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/bin/jekyll:264:in `<top (required)>'
/home/twtwtw/.rbenv/versions/1.9.3-p194/bin/jekyll:23:in `load'
/home/twtwtw/.rbenv/versions/1.9.3-p194/bin/jekyll:23:in `<main>'
Build Failed

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.