Giter Site home page Giter Site logo

jekyll-tagging's Introduction

jekyll-tagging

By Arne Eilermann <[email protected]> and Jens Wille <[email protected]>

jekyll-tagging is a Jekyll plugin, to add a tag cloud and per tag pages plus feeds to your Jekyll generated Website.

Tags

This plugin does not reinvent Jekyll’s tagging feature. It just makes it easy to use. <jekyllrb.com/docs/frontmatter/>

Add space-delimited lowercase tags to FrontMatter, e.g.

---
author: Willow Rosenberg
tags: feminism anti-capitalism witchcraft
---

Usage

Install it:

gem install jekyll-tagging

Add this line to your Jekyll project’s Gemfile:

gem 'jekyll-tagging'

Add the following to your _plugins/ext.rb file:

require 'jekyll/tagging'

And in your _config.yml you have to define your layout used to generate tag pages like:

tag_page_layout: tag_page
tag_page_dir: tag

This will look for _layouts/tag_page.html, and use it to generate tag pages into the _site/tag directory.

Now you have a new filter called tag_cloud which you can use with the site object as argument in your layout to get a cloud of all your site’s tags. The tags are linked to their related tag page. Furthermore, you have a tags filter which you can feed with a post or a page object to get a link list of all its tags.

You can optionally define a per tag Atom/RSS feed. In your _config.yml define the following:

tag_feed_layout: tag_feed
tag_feed_dir: tag

(tag_page_dir and tag_feed_dir can have the same value.)

If your Jekyll permalink configuration is set to something other than :pretty, and you still want to have pretty tag links define the following in your _config.yml:

tag_permalink_style: pretty

Ignoring tags

Sometimes you don’t want tag pages generated for certain pages. That’s ok! Just add ignored_tags: [tags,to,ignore] to your _config.yml

Extra data on tag pages

You can attach extra data to generated tag pages by specifying tag_page_data in _config.yml (this also works for tag_feed_data). For example, you might want to exclude tag pages from being picked up by ‘jekyll-sitemap`:

tag_page_data:
  sitemap: false

Example tag page layout

(Save this to _layouts/tag_page.html if using the _config.yml snippet above.)

---
layout: default
---
<h2>{{ page.tag }}</h2>
<ul>
{% for post in page.posts %}
  <li><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }} | Tags: {{ post | tags }})</li>
{% endfor %}
</ul>

<div id="tag-cloud">
  {{ site | tag_cloud }}
</div>

Example layout of an Atom feed

(Save this to _layouts/tag_feed.xml if using the _config.yml snippet above.)

---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>Your Title - {{ page.tag }}</title>
 <link href="http://example.com{{ page.url }}" rel="self"/>
 <link href="http://example.com/tag/{{ page.tag }}.html"/>
 <updated>{{ site.time | date_to_xmlschema }}</updated>
 <id>http://example.com/tag/{{ page.tag }}.html</id>
 <author>
   <name>Author Here</name>
 </author>
 {% for post in page.posts %}
 <entry>
   <title>{{ post.title }}</title>
   <link href="http://example.com{{ post.url }}"/>
   <updated>{{ post.date | date_to_xmlschema }}</updated>
   <id>http://example.com{{ post.id }}</id>
   <content type="html">{{ post.content | xml_escape }}</content>
 </entry>
 {% endfor %}
</feed>

Documentation

<rubydoc.info/gems/jekyll-tagging/frames>

Source code

<github.com/pattex/jekyll-tagging>

RubyGem

<rubygems.org/gems/jekyll-tagging>

License

The MIT License

Copyright © 2010-2012 University of Cologne, Albertus-Magnus-Platz, 50923 Cologne, Germany

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.

jekyll-tagging's People

Contributors

blackwinter avatar dnd avatar golddranks avatar henry0312 avatar jonathanpberger avatar macta avatar pattex avatar surajgupta avatar tfe avatar wsmoak avatar zspencer 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

jekyll-tagging's Issues

[Feature] Allow spaces to be escaped in URLs

For tags like:

tags:
 - multi word
 - other tag

URLs show up as:

http://site.com/path/multi%20word/     # pretty

or as:

http://site.com/path/other%20tag.html  # default

It would be great to have the option of formatting them with hyphens, underscores, etc. like:

http://site.com/path/multi-word/

or:

http://site.com/path/other_tag.html

or even just eliminating spaces from the URL completely...

generate a /tag/index.html

The /tag/ directory has no index, which produces either a Forbidden or a directory listing. It would be nice to have something there, either a configurable page or just a default-layout page with the tag cloud as the content.

Better support for loading from config file

The standard plugins (such as jekyll-feed) are loadable in config such as jekyll-feed, but due to the directory layout, we need to do it as jekyll/tagging. It would be cool to make this match.

_config.yml

gems:
  - jekyll/tagging          # https://github.com/pattex/jekyll-tagging
  - jekyll-feed             # https://github.com/jekyll/jekyll-feed

Additionally, updating the install instructions to show the config method would be awesome.

Liquid Exception: undefined method `join'

In setting up this plugin, I followed the instructions to the "t" per the documentation, but when I add tags: feminism anti-capitalism witchcraft to a post, I get the following error:

Liquid Exception: undefined method 'join' for "feminism anti-capitalism witchcraf":String in /_layouts/default.html

Any idea what the issue is?

My current version of Jekyll is 3.4.1.

no implicit conversion of nil into String

I am running into this error while building a site with tagging plugin.
(I have added this in octopress, don't think it should matter).

Any help in this matter is much appreciated.

followed all steps up about setting up plugin (gem install, tweaking _config.yml, defining tag_page layout and ext.rb requiring jekyll/tagging.rb)

jekyll build --trace

/var/lib/gems/2.1.0/gems/jekyll-tagging-0.6.0/lib/jekyll/tagging.rb:41:in join': no implicit conversion of nil into String (TypeError) from /var/lib/gems/2.1.0/gems/jekyll-tagging-0.6.0/lib/jekyll/tagging.rb:41:inblock in new_tag'
from /var/lib/gems/2.1.0/gems/jekyll-tagging-0.6.0/lib/jekyll/tagging.rb:33:in each' from /var/lib/gems/2.1.0/gems/jekyll-tagging-0.6.0/lib/jekyll/tagging.rb:33:innew_tag'
from /var/lib/gems/2.1.0/gems/jekyll-tagging-0.6.0/lib/jekyll/tagging.rb:29:in block in generate_tag_pages' from /var/lib/gems/2.1.0/gems/jekyll-tagging-0.6.0/lib/jekyll/tagging.rb:29:ineach'
from /var/lib/gems/2.1.0/gems/jekyll-tagging-0.6.0/lib/jekyll/tagging.rb:29:in generate_tag_pages' from /var/lib/gems/2.1.0/gems/jekyll-tagging-0.6.0/lib/jekyll/tagging.rb:19:ingenerate'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:280:in block in generate' from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:279:ineach'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:279:in generate' from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:50:inprocess'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/command.rb:28:in process_site' from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:56:inbuild'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:34:in process' from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:18:inblock (2 levels) in init_with_program'
from /var/lib/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in call' from /var/lib/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:inblock in execute'
from /var/lib/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in each' from /var/lib/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:inexecute'
from /var/lib/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in go' from /var/lib/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:inprogram'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/bin/jekyll:20:in <top (required)>' from /usr/local/bin/jekyll:23:inload'
from /usr/local/bin/jekyll:23:in `

'

post will appear on tag page twice if a tag is listed twice

jekyll-tagging is great! Thank you.

I had a post.md file that had a tag listed 2x

[example, different, hello, example, five]

The post appeared twice on the tags page for "example".

So.. a "bug" because the end-user did something wrong. But maybe a warning could show in the console if the same tag is detected more than once in a single post?

Regenerate tags?

I'm using jekyll-tagging in a local clone in order to generate tags. Then I copy them to the github site as if they were static pages (because github does not allow plugins). From time to time, jekyll-tags is missing some tags and I'm wondering if there is a way to re-generate the tags for the whole site in order to recover the missing tags. Or, maybe, re-generating tags for some posts.
Thanks for any hints!

Remove accents from slugs

I have a tag that is the french word « vidéo ». It is kept as is for the tag page, so I have a tags/vidéo.html file.

When I deploy it, there are issues.

The link in the tags cloud is /tags/vid%C3%A9o.html, the browser —I use Firefox on a Mac— shows /tags/vidéo.html in the URL bar, but the server answers with a 404 error, The requested URL /tags/vidéo.html was not found on this server.

It would be very nice if the plugin could let me use the « vidéo » tag in my posts, but generate a tags/video.html page, without the accent.

Dependency Error: Yikes! It looks like you don't have jekyll-tagging

Hi, I am already using gem 'jekyll-tagging', '~> 1.0', '>= 1.0.1' and correct configuration yet following error:

Dependency Error: Yikes! It looks like you don't have jekyll-tagging or one of its dependencies installed. In order to use Jekyll as currently configured,
you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-tagging' If you run into trouble, you can find helpf
ul resources at http://jekyllrb.com/help/!

Some tags duplicated in the tags cloud with lower-case and upper-case forms, but a single lower-case page

On http://nicolas-hoizey.com/#tags you can see that there are some tags that are duplicated, with both the upper-case and the lower-case value, even if both now link to the same lower-case URL.

For example SVG and svg:

One post has the upper-case SVG tag and is listed in the tag page, but another post has the lower-case svg tag and is not listed…

There are several other examples, with spip/SPIP, tgif/TGIF, twitter/Twitter, url/URL and web/Web

I know I should be consistant with case in my post tags, but it is nonetheless a bug IMHO.

License issue

jekyll-tagging is "released" under MIT license, however it has dependencies on ruby-nuggets or nuggets which licensed as AGPL. So jekyll-tagging should be licensed as AGPL as well or should not depend on nuggets.

/cc @blackwinter

NoMethodError when trying the example from the Readme

My plugins/ext.rb:

~/blog$ cat plugins/ext.rb 
require 'jekyll/tagging

The part in the _config.yml:

~/blog$ cat _config.yml | grep tag
tag_page_layout: tag_page
tag_page_tag: tag

My tag site:

~/blog$ cat source/tags.html 

---
layout: page
title: "tags"
date: 2012-11-29 12:35
comments: true
sharing: true
footer: true

---

<h2>{{ page.tag }}</h2>
<ul>
{% for post in page.posts %}
  <li><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }} | Tags: {{ post | tags }})</li>
{% endfor %}
</ul>

<div id="tag-cloud">
  {{ site | tag_cloud }}
</div>

The error:

/home/matthias/.gem/ruby/1.9.1/gems/jekyll-tagging-0.4.0/lib/jekyll/tagging.rb:41:in `block in new_tag': undefined method `ext' for nil:NilClass (NoMethodError)
        from /home/matthias/.gem/ruby/1.9.1/gems/jekyll-tagging-0.4.0/lib/jekyll/tagging.rb:33:in `each'
        from /home/matthias/.gem/ruby/1.9.1/gems/jekyll-tagging-0.4.0/lib/jekyll/tagging.rb:33:in `new_tag'
        from /home/matthias/.gem/ruby/1.9.1/gems/jekyll-tagging-0.4.0/lib/jekyll/tagging.rb:29:in `block in generate_tag_pages'
        from /home/matthias/.gem/ruby/1.9.1/gems/jekyll-tagging-0.4.0/lib/jekyll/tagging.rb:29:in `each'
        from /home/matthias/.gem/ruby/1.9.1/gems/jekyll-tagging-0.4.0/lib/jekyll/tagging.rb:29:in `generate_tag_pages'
        from /home/matthias/.gem/ruby/1.9.1/gems/jekyll-tagging-0.4.0/lib/jekyll/tagging.rb:19:in `generate'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:184:in `block in generate'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:183:in `each'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:183:in `generate'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:39:in `process'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/bin/jekyll:250:in `<top (required)>'
        from /usr/bin/jekyll:19:in `load'
        from /usr/bin/jekyll:19:in `<main>'

Support pagination

While having tag pages is great, if you have a lot of posts with the same tag, that one page can get rather long. It'd be nice if the paginator could be updated to allow for pagination.

Name and slug

It'd be nice if I could set names and slugs of each tag, so that I could automatically show the title different from the slug itself. I'm deploying it manually by doing like this:

{% if page.tag == 'food' %}
    <h2>Favorite Food</h2>
{% elseif page.tag == 'place' %}
    <h2>Favorite Place</h2>
{% else %}
   <h2>{{ page.tag }}</h2>
{% endif %}

Or anyone knows how to handle it by tweating liquid tags?

Issue with plugin loading/execution order?

I don't know where this error comes from, I get the following message:

$ ./_build.sh                                                                                               *?[master] 
Configuration file: ./_config.yml
  Liquid Exception: undefined method `config' for nil:NilClass in _layouts/archives-year.html
rake aborted!
NoMethodError: undefined method `config' for nil:NilClass
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-tagging-1.0.1/lib/jekyll/tagging.rb:133:in `tag_url'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-tagging-1.0.1/lib/jekyll/tagging.rb:140:in `block in tags'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-tagging-1.0.1/lib/jekyll/tagging.rb:140:in `map!'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-tagging-1.0.1/lib/jekyll/tagging.rb:140:in `tags'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/strainer.rb:43:in `invoke'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/context.rb:82:in `invoke'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/variable.rb:50:in `block in render'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/variable.rb:38:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/variable.rb:38:in `inject'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/variable.rb:38:in `render'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/block.rb:109:in `block in render_all'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/block.rb:96:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/block.rb:96:in `render_all'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/tags/for.rb:117:in `block (2 levels) in render'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/tags/for.rb:105:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/tags/for.rb:105:in `each_with_index'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/tags/for.rb:105:in `block in render'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/context.rb:112:in `stack'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/tags/for.rb:104:in `render'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/block.rb:109:in `block in render_all'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/block.rb:96:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/block.rb:96:in `render_all'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/block.rb:82:in `render'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/template.rb:128:in `render'
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-2.6.3/lib/liquid/template.rb:138:in `render!'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/convertible.rb:106:in `render_liquid'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/convertible.rb:205:in `render_all_layouts'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/convertible.rb:239:in `do_layout'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-archives-2.0.0/lib/jekyll-archives/archive.rb:104:in `render'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-archives-2.0.0/lib/jekyll-archives.rb:96:in `block in render'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-archives-2.0.0/lib/jekyll-archives.rb:95:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-archives-2.0.0/lib/jekyll-archives.rb:95:in `render'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-archives-2.0.0/lib/jekyll-archives.rb:40:in `generate'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:280:in `block in generate'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:279:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:279:in `generate'
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:50:in `process'
/Users/nhoizey/Dropbox/Personnel/Devs/nicolas-hoizey.com/Rakefile:15:in `block (2 levels) in <top (required)>'
Tasks: TOP => site:index => site:generate
(See full trace by running task with --trace)

The trace shows it happens in /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-tagging-1.0.1/lib/jekyll/tagging.rb:133:in 'tag_url'

My source code is here: https://github.com/nhoizey/nicolas-hoizey.com

I first opened this issue in the jekyll-archive project:
jekyll/jekyll-archives#49

There, @alfredxing told me this:

Although I'm not familiar with the jekyll-tagging plugin, it seems like that plugin is being initialized after jekyll-archives in this case, which means you can't use the tags filter in an archive page.

You might want to raise the issue with the developer of that plugin. I believe it's possible to access the site config in a Liquid filter (using Liquid context registers) without needing to initialize the generator first.

Any hints? Thanks in advance for your help.

Is it possible to have a tag-permalink option?

What I mean is that with jekyll one can have a permalink: in their _config.yml to specify what each posts url looks like? Is this possible to achieve for tags?

If it is not supported in the current version of jekyll-tagging I will try to fork and contribute.

Looks like it's broken with Jekyll 3.2.0

The plugin works well with Jekyll 3.1.6, but stops working when upgrading to Jekyll 3.2.0

{{ page | tags }} doesn't generate anything, and even breaks the rest of the generated HTML.

Cannot require.

I followed your instructions and did

gem install jekyll-tagging

and insert a file extr.rb in ./plugins and insert

require 'jekyll/tagging'

but it results in the following error:

/home/matthias/blog/plugins/ext.rb:1:in `require': cannot load such file -- jekyll-tagging (LoadError)
        from /home/matthias/blog/plugins/ext.rb:1:in `<top (required)>'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:76:in `require'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:76:in `block in setup'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:75:in `each'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:75:in `setup'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:30:in `initialize'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/bin/jekyll:224:in `new'
        from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/bin/jekyll:224:in `<top (required)>'
        from /usr/bin/jekyll:19:in `load'
        from /usr/bin/jekyll:19:in `<main>'

kind regards.

Title of tag page

Hi,
I need the tag title in my default layout like this: <title>Tag title - Blog title</title>
for post we have:

{% if page.title %}
  {{ page.title | escape }} - {{ site.title | escape }}
{% else %}
  {{ site.title | escape }}
{% endif %}

but how can I add if it was page.tag ?

Remove accents on tags url

I've made a tag cloud on Jekyll with jekyll-tagging plugin. The plugin works fine, but when o need to iterate trough tags and append the name to a url, the accents still there, wich causes a error, even with the slugfy method. I'm new with RUBY and i didn't found any native RUBY method to remove the accents, even on Jekyll.

tag_page_dir and baseurl don't play together

{{ post | tags }} generates links with /tag/foo/ no matter what I set the folder to (baseurl being /new in my case, tried using /new/tag but that did not work either). Tag indexes are generated correctly to /new/tag/foo/index.html, just the links are incorrect.

Issue with pluging

I got this when trying to run Jekyll with this plugin:

  Configuration from /home/arch/le/site/_config.yml
    /home/arch/le/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- jekyll/tagging (LoadError)
      from /home/arch/le/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
      from /home/arch/le/site/source/_plugins/extensions.rb:1
      from /home/arch/le/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
      from /home/arch/le/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
      from /home/arch/le/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:76:in `setup'
      from /home/arch/le/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:75:in `each'
      from /home/arch/le/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:75:in `setup'
      from /home/arch/le/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:30:in `initialize'
      from /home/arch/le/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.11.2/bin/jekyll:224:in `new'
      from /home/arch/le/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.11.2/bin/jekyll:224
      from /home/arch/le/.rvm/gems/ruby-1.8.7-p352/bin/jekyll:19:in `load'
      from /home/arch/le/.rvm/gems/ruby-1.8.7-p352/bin/jekyll:19

Posts with identical tags produce multiple entries on tag page

I'm using jekyll-tagging0.6.0`. I have a post with this:

tags: [Homebaking, banana, quick bread, banana]

This causes two entries for the post to show up on the generated /tag/banana page.

The tag array should be run through uniq! or something like that.

The workaround is to just remove the duplicate tag from the post, obviously.

page.posts is not site.posts

Index templates use site.posts, but this plugin stores the posts in page.posts. This is really annoying because in order to re-use templates, I need to do:

{% if page.posts %}
    {% assign posts = page.posts %}
{% else %}
    {% assign posts = site.posts %}
{% endif %}

{% for post in posts %}
    ...
{% endfor %}

Unless there is a better way to do it -- but I didn't find one.

Ideally they would both just store it in site.posts.

Slugs not compatible with Liquid

When creating links to tag pages, something like this is intuitive:

{% for tag in page.tags %}
  <li><a href="{{ site.baseurl }}/{{ site.tag_page_dir }}/{{ tag | slugify }}.html">{{ tag }}</a></li>
{% endfor %}

Unfortunately, slugify is not compatible to your jekyll_tagging_slug.

I don't know how robust jekyll_tagging_slug is but you may want to switch to using slugify for consistency with other Jekyll stuff.

Add rel="tag"

I was wondering if you would consider adding rel=tag to the links generated to show the articles tags.

Thanks for jekyll-tagging

Just to express my gratitude for your work.

Please don't close this issue for other users to vote if they like too.

Display blank home page

I have followed the https://github.com/pattex/jekyll-tagging to install "jekyll-tagging"

I went through the following steps.

  • installed jekyll-tagging package using gem

  • added "require 'jekyll/taggin'" into _plugins/ext.rb

  • added following lines into _config.yml file
    tag_page_layout: tag_page
    tag_page_dir: tag

    tag_feed_layout: tag_feed
    tag_feed_dir: tag

    tag_permalink_style: pretty

  • After restarting the jekyll service, I am not able to see the jekyll home page(displaying blank page).

Do i need to add any extra info in index.html file? I din't change anything in index.html. Could you please suggest me?

Thanks,
Chinna

active_tag_data throws exception occasionally

This is what I'm getting, time to time:

/usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/jekyll-tagging-0.5.0/lib/jekyll/tagging.rb:119:in `active_tag_data': undefined method `config' for nil:NilClass (NoMethodError)
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/jekyll-tagging-0.5.0/lib/jekyll/tagging.rb:96:in `tag_cloud'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/strainer.rb:43:in `invoke'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/context.rb:82:in `invoke'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/variable.rb:50:in `block in render'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/variable.rb:38:in `each'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/variable.rb:38:in `inject'
...

I think that the problem is that you're relying on a static property Tagger.site being initialized. But it's not always true. I'm sure what exactly is going on. I'm using Jekyll 2.2.0

Raw tag names for the generation of atom category tags

I'd like to add tags like this to my atom feed

If I read the code correctly I can only get a list of tag-links for a post with {{ post | tags }} but not the raw tags.
Either getting a list of raw names or being able to specify a template for the generated tags would be helpful.

Thanks in advance. The plugin is already very useful.

Cheers,
Robert

Tags with space

Is it possible to have tags with space like "Software Libre". Because I get tag "Software" and tag "Libre" separated.

Thanks.

Jekyll::Drops::SiteDrop

{{ site | tag_cloud }}

outputs:

Jekyll::Drops::SiteDrop

I have this in Gemfile:

gem 'jekyll', '3.2'
gem 'jekyll-paginate'
gem 'pygments.rb'
gem 'jekyll-tagging'
gem 'json', '~> 2.0'

I was testing older version just to be sure if it's not version issue.

My posts have space separated tags, and I've added this in my _include/sidebar.html:

{{ site | tag_cloud }}

my tag_page.html have:

---
layout: default
---
<header>
  <h2>{{ page.tag }}</h2>
</header>
<ul>
  {% for post in page.posts %}
  <li><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }} | Tags: {{ post | tags }})</li>
{% endfor %}
</ul>

<div id="tag-cloud">
  {{ site | tag_cloud }}
</div>

and I have this in _config.yml

tag_page_layout: tag_page
tag_page_dir: tag
tag_permalink_style: pretty

not tag directory and no tag cloud.

Where to place files?

This might sound naive but it might be beneficial to specify where to place the "Example tag page layout" - what should that file be called? Where should it be placed?

Only one tag page generated from tags that differ only in capitalization

I have a post tagged with, say, "Milk" and another tagged with "milk". These are treated as distinct tags within Jekyll, as I see both when iterating through site.tags and my tag list page.

However, no tag page is generated for the capitalized one. That is, the page <site>/tag/milk/index.html is generated, but NOT <site>/tag/Milk/index.html.

Something to do with case sensitivity on the underlying file system? (I'm on a Mac, FWIW).

For my particular usage, I don't need two separate tag pages, I'd be happy to coalesce both of them, preferably without having to edit all the posts.

Support index pages

It's pretty easy to set up paths like "/tags/opensource.html", but that URL style is different from the rest of my site. It'd be nice if I could generate "/tags/opensource/index.html" so I could refer to just "/tags/opensource/" in my URLs.

Request: 2 Mods

I'm not a ruby expert otherwise I'm sure I could easily do this myself. How hard would it be to make the following changes:

  1. Change the tag page creation so instead of generating paths like /tag/programming.html it creating paths like /tag/programming/index.html (so one could use pretty urls /tag/programming).
  2. Change to use Jekyll's default Categories "section" instead of creating a new "section" called tags. Just want to align with Jekyll core as much as possible.

Sorry if these are dumb requests...I'm a newbie. ;)

Cannot load such file -- jekyll-tagging

It simply doesn't work for me.
After I added - jekyll-tagging to the _config.yml, I am receiving error message like

Dependency Error: Yikes! It looks like you don't have jekyll-tagging or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-tagging' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!                              
jekyll 3.2.1 | Error:  jekyll-tagging

But it is installed - I installed it with gem install jekyll-tagging without any error:

jekyll-tagging-1.0.1 [2015-06-11]:

* Substitution of non ASCII characters and whitespaces, also when 'tag_permalink_style: pretty'.

Successfully installed jekyll-tagging-1.0.1
Parsing documentation for jekyll-tagging-1.0.1
Done installing documentation for jekyll-tagging after 0 seconds
1 gem installed

What am I doing wrong?

If I open irb and type require 'jekyll-tagging', I am getting similar error:

LoadError: cannot load such file -- jekyll-tagging
        from /usr/lib64/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib64/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from (irb):1
        from /usr/bin/irb:11:in `<main>'

What is wrong here?

$ gem list | grep jekyll
jekyll (3.3.1, 3.2.1)
jekyll-feed (0.8.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.4.0)
jekyll-sitemap (0.11.0)
jekyll-tagging (1.0.1)
jekyll-watch (1.3.1)
$ gem --version
2.6.8
$ ruby --version
ruby 2.2.6p396 (2016-11-15 revision 56800) [x86_64-linux]

AGPL

gem nuggets is licensed under Affero GPL which is quite infectious. it is necessary to clearly mark this or to get rid of nuggets dependency

Filter comma out of

It would be useful to be able to remove the comma separator from {{ post | tags }}.

Problem when a tag is part of title

With most recent version of Jekyll (3.3.1) and jekyll-tagging from master (a981f78) if I run jekyll doctor I get the following error:

      Conflict: The URL '/home/mehdi/Projects/mehdix.ir/_site/tag/ssl.html' is the destination for the following pages: tag/ssl.html, tag/ssl.html
      Conflict: The URL '/home/mehdi/Projects/mehdix.ir/_site/tag/yaml.html' is the destination for the following pages: tag/yaml.html, tag/yaml.html

By carefully inspecting my posts I realized this problem occurs when a tag is part of the title. In my case, the word YAML was a tag and at the same time part of the title.

nuggets "Please update your dependencies."

when saying "gem install jekyll-tagging" I got this message, which I am passing on:

ruby-nuggets-1.0.0 [2014-06-20]:

  • This project has been renamed to +nuggets+. Please update your dependencies.

The version it installed for me is jekyll-tagging-1.0.1 [2015-06-11].

Not working on Github

I am probably doing something wrong, this plugin worked with Jekyll 2.5 locally for me, but is failing on Github. Doesn't generate anything in tag/*.

If I add jekyll-tagging to gems I get " `require': cannot load such file -- jekyll-tagging", this makes sense since that doesn't exist and should be jekyll/tagging. We can fix this here if that's the right thing to do.

However just copying jekyll/tagging.rg into _plugins works locally, but doesn't do anything on Github.

What's the right way to set this up?

My code: https://github.com/dblock/code

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.