[DRAFT] Add tags/categories/archives pages plugins #870

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
10 participants
@ixti
Member

ixti commented Mar 17, 2013

This is a start discussion pull request (real one will be re-factored and recreated as a separate one).

These plugins adds "dynamically" generated pages for archives (list posts by years), tags and categories. Usage example can be found on my blog (https://github.com/ixti/ixti.github.com/):

Follows up of #867.

+ end
+
+
+ class Page

This comment has been minimized.

Show comment Hide comment
@parkr

parkr Mar 17, 2013

Owner

It'd be sweet if you could modify lib/jekyll/page.rb with any modifications necessary.

@parkr

parkr Mar 17, 2013

Owner

It'd be sweet if you could modify lib/jekyll/page.rb with any modifications necessary.

+ end
+
+
+ module SitePatch

This comment has been minimized.

Show comment Hide comment
@parkr

parkr Mar 17, 2013

Owner

Could these patches be submitted against lib/jekyll/site.rb?

@parkr

parkr Mar 17, 2013

Owner

Could these patches be submitted against lib/jekyll/site.rb?

This comment has been minimized.

Show comment Hide comment
@ixti

ixti Mar 17, 2013

Member

All three plugins are similar to each other and of course if we are talking about including into core they can be simplified a lot. I just wanted to show off plugins themselves and what they provide. If their purpose is desired in jekyll core I'll spend some time on next weekend to refactor pull request to be more "close" to the final one. Just need to be sure that it won't get into conflict with generak policy of a party :D

@ixti

ixti Mar 17, 2013

Member

All three plugins are similar to each other and of course if we are talking about including into core they can be simplified a lot. I just wanted to show off plugins themselves and what they provide. If their purpose is desired in jekyll core I'll spend some time on next weekend to refactor pull request to be more "close" to the final one. Just need to be sure that it won't get into conflict with generak policy of a party :D

@parkr

This comment has been minimized.

Show comment Hide comment
@parkr

parkr May 13, 2013

Owner

I'd love to see these added into the jekyll core. Having tags and categories without a direct means of showing them (short of looping through site posts and printing those which match a hard-coded category or tag name) seems to point to a missing feature to me.

@mattr-, what do you think?

Owner

parkr commented May 13, 2013

I'd love to see these added into the jekyll core. Having tags and categories without a direct means of showing them (short of looping through site posts and printing those which match a hard-coded category or tag name) seems to point to a missing feature to me.

@mattr-, what do you think?

@mattr-

This comment has been minimized.

Show comment Hide comment
@mattr-

mattr- May 13, 2013

Owner

I think this is awesome! 👍 🎉

Owner

mattr- commented May 13, 2013

I think this is awesome! 👍 🎉

@mattr-

This comment has been minimized.

Show comment Hide comment
@mattr-

mattr- May 13, 2013

Owner

And obviously they don't need to be plugins anymore. 😃

Owner

mattr- commented May 13, 2013

And obviously they don't need to be plugins anymore. 😃

@dragoon

This comment has been minimized.

Show comment Hide comment
@dragoon

dragoon Jun 1, 2013

+1 for those pages, just one question, are your plugins somehow better than: https://github.com/recurser/jekyll-plugins ? How do they differ?

dragoon commented Jun 1, 2013

+1 for those pages, just one question, are your plugins somehow better than: https://github.com/recurser/jekyll-plugins ? How do they differ?

@dragoon

This comment has been minimized.

Show comment Hide comment
@dragoon

dragoon Jun 1, 2013

The plugin does not work for me, returns error:

Generating... error: undefined methoduses_relative_permalinks' for #<Jekyll:ArchivesPlugin:Page @year=2011>. Use --trace to view backtrace`

It seems that new Jekyll uses some method that plugin does not implement.

dragoon commented Jun 1, 2013

The plugin does not work for me, returns error:

Generating... error: undefined methoduses_relative_permalinks' for #<Jekyll:ArchivesPlugin:Page @year=2011>. Use --trace to view backtrace`

It seems that new Jekyll uses some method that plugin does not implement.

@ixti

This comment has been minimized.

Show comment Hide comment
@ixti

ixti Jun 1, 2013

Member

I don't know how they differ, they are just what I wrote for myself. This pull request is outdated of course, but it's just a draft (a stub if you will) so if general idea will be accepted - it will be completely refactored and new pull request will takeover this one. If you want to see these plugins working with current version of Jekyll grab them from my blog's sources directly: https://github.com/ixti/ixti.github.com/tree/source/_plugins

Member

ixti commented Jun 1, 2013

I don't know how they differ, they are just what I wrote for myself. This pull request is outdated of course, but it's just a draft (a stub if you will) so if general idea will be accepted - it will be completely refactored and new pull request will takeover this one. If you want to see these plugins working with current version of Jekyll grab them from my blog's sources directly: https://github.com/ixti/ixti.github.com/tree/source/_plugins

@dragoon

This comment has been minimized.

Show comment Hide comment
@dragoon

dragoon Jun 2, 2013

Hi, thanks for the reply. Actually I have already tried to use plugins form your blog sources, and they did not work either.
I had to add the following function to the Page class to fix them. Don't know if it's correct or not since I'm not a ruby programmer, just want to set up my blog :)

  def uses_relative_permalinks
      url && @dir != "" && site.config['relative_permalinks']
  end

dragoon commented Jun 2, 2013

Hi, thanks for the reply. Actually I have already tried to use plugins form your blog sources, and they did not work either.
I had to add the following function to the Page class to fix them. Don't know if it's correct or not since I'm not a ruby programmer, just want to set up my blog :)

  def uses_relative_permalinks
      url && @dir != "" && site.config['relative_permalinks']
  end
@ixti

This comment has been minimized.

Show comment Hide comment
@ixti

ixti Jun 2, 2013

Member

@dragoon Oops. Sorry. I've committed a fix about a month ago but forgot to push. Your variant will work as expected, but it's just not needed - those generators will never generate relative links, so in my commit I just stubbed uses_realtive_permalinks with false.

Member

ixti commented Jun 2, 2013

@dragoon Oops. Sorry. I've committed a fix about a month ago but forgot to push. Your variant will work as expected, but it's just not needed - those generators will never generate relative links, so in my commit I just stubbed uses_realtive_permalinks with false.

@ixti

This comment has been minimized.

Show comment Hide comment
@ixti

ixti Jun 2, 2013

Member

So, if overall "feeling" is quiet "we want it", I'll prepare more realistic pull request.
/cc @parkr @mattr-

Member

ixti commented Jun 2, 2013

So, if overall "feeling" is quiet "we want it", I'll prepare more realistic pull request.
/cc @parkr @mattr-

@mattr-

This comment has been minimized.

Show comment Hide comment
@mattr-

mattr- Jun 3, 2013

Owner

I think both @parkr and I said that we wanted this. Get crackin' on that PR! 😃

Owner

mattr- commented Jun 3, 2013

I think both @parkr and I said that we wanted this. Get crackin' on that PR! 😃

@mattr- mattr- closed this Jun 3, 2013

@parkr

This comment has been minimized.

Show comment Hide comment
@parkr

parkr Jun 3, 2013

Owner

I do think they should be opt-in, but yeah I'd love to see this in the core!

Owner

parkr commented Jun 3, 2013

I do think they should be opt-in, but yeah I'd love to see this in the core!

@ixti ixti deleted the ixti:feature-tags-pages branch Jun 3, 2013

@mayarichman

This comment has been minimized.

Show comment Hide comment
@mayarichman

mayarichman Jul 10, 2013

What's the status of built-in tag support for Jekyll on Github?

I'm building a blog with multiple contributors who will primarily interact through Prose.io and cannot be building locally and pushing to Github every time they post something new. Tags are extremely important and useful for this site, but so far it only runs locally with plugins.

What's the status of built-in tag support for Jekyll on Github?

I'm building a blog with multiple contributors who will primarily interact through Prose.io and cannot be building locally and pushing to Github every time they post something new. Tags are extremely important and useful for this site, but so far it only runs locally with plugins.

@mattr-

This comment has been minimized.

Show comment Hide comment
@mattr-

mattr- Jul 10, 2013

Owner

I'm afraid I'm a bit confused by your question. This pull request is about
adding archive pages for posts by year, tag, and/or category.

Jekyll supports tags for posts already. Tags are specified in the YAML
front matter for posts. You can find more info in the docs about
frontmatter
.

Owner

mattr- commented Jul 10, 2013

I'm afraid I'm a bit confused by your question. This pull request is about
adding archive pages for posts by year, tag, and/or category.

Jekyll supports tags for posts already. Tags are specified in the YAML
front matter for posts. You can find more info in the docs about
frontmatter
.

@mayarichman

This comment has been minimized.

Show comment Hide comment
@mayarichman

mayarichman Jul 10, 2013

I thought Jekyll supported tags but Github Pages prevents the functionality that allows custom pages to be built for each tag because it disables custom plugins. See this blog post.

I thought this issue was about adding to the Jekyll core some basic tag pages functionality something.io/tag/ruby so when Github Pages upgraded Jekyll there would be built-in functionality for this.

I thought Jekyll supported tags but Github Pages prevents the functionality that allows custom pages to be built for each tag because it disables custom plugins. See this blog post.

I thought this issue was about adding to the Jekyll core some basic tag pages functionality something.io/tag/ruby so when Github Pages upgraded Jekyll there would be built-in functionality for this.

@mattr-

This comment has been minimized.

Show comment Hide comment
@mattr-

mattr- Jul 10, 2013

Owner

That is exactly what this issue is about, yes. I thought you were talking
about tag functionality in general before. I'm sorry for misunderstanding
you. We're actually waiting on @ixti to submit what he thinks is the real
pull request for this.

On Wed, Jul 10, 2013 at 3:59 PM, Maya notifications@github.com wrote:

I thought Jekyll supported tags but Github Pages prevents the
functionality that allows custom pages to be built for each tag because it
disables custom plugins. See this blog posthttp://charliepark.org/tags-in-jekyll/
.

I thought this issue was about adding to the Jekyll core some basic tag
pages functionality something.io/tag/ruby so when Github Pages upgraded
Jekyll there would be built-in functionality for this.


Reply to this email directly or view it on GitHubhttps://github.com/mojombo/jekyll/pull/870#issuecomment-20772785
.

Owner

mattr- commented Jul 10, 2013

That is exactly what this issue is about, yes. I thought you were talking
about tag functionality in general before. I'm sorry for misunderstanding
you. We're actually waiting on @ixti to submit what he thinks is the real
pull request for this.

On Wed, Jul 10, 2013 at 3:59 PM, Maya notifications@github.com wrote:

I thought Jekyll supported tags but Github Pages prevents the
functionality that allows custom pages to be built for each tag because it
disables custom plugins. See this blog posthttp://charliepark.org/tags-in-jekyll/
.

I thought this issue was about adding to the Jekyll core some basic tag
pages functionality something.io/tag/ruby so when Github Pages upgraded
Jekyll there would be built-in functionality for this.


Reply to this email directly or view it on GitHubhttps://github.com/mojombo/jekyll/pull/870#issuecomment-20772785
.

@mayarichman mayarichman referenced this pull request in youngist/clean-blog Jul 10, 2013

Closed

Need custom pages for each new tag used #6

@mayarichman

This comment has been minimized.

Show comment Hide comment
@mayarichman

mayarichman Jul 10, 2013

No problem, I am looking forward to the continued development of this, right now I am plotting some hackish solutions.

No problem, I am looking forward to the continued development of this, right now I am plotting some hackish solutions.

@ixti

This comment has been minimized.

Show comment Hide comment
@ixti

ixti Jul 11, 2013

Member

Sorry for delay. Will submit a pull request this weekend.

Member

ixti commented Jul 11, 2013

Sorry for delay. Will submit a pull request this weekend.

@mattr-

This comment has been minimized.

Show comment Hide comment
@mattr-

mattr- Jul 11, 2013

Owner

No worries. Don't rush yourself unnecessarily. 😃

On Wed, Jul 10, 2013 at 7:47 PM, Aleksey V. Zapparov
notifications@github.com wrote:

Sorry for delay. Will submit a pull request this weekend.

Reply to this email directly or view it on GitHub:
mojombo#870 (comment)

Owner

mattr- commented Jul 11, 2013

No worries. Don't rush yourself unnecessarily. 😃

On Wed, Jul 10, 2013 at 7:47 PM, Aleksey V. Zapparov
notifications@github.com wrote:

Sorry for delay. Will submit a pull request this weekend.

Reply to this email directly or view it on GitHub:
mojombo#870 (comment)

@ixti

This comment has been minimized.

Show comment Hide comment
@ixti

ixti Aug 28, 2013

Member

I don't know when I'll find time to finish this proposal, so if there anybody wish to overtake it - I'll be glad. Feel free to use code from proposed plugins if you'll find them useful.

Member

ixti commented Aug 28, 2013

I don't know when I'll find time to finish this proposal, so if there anybody wish to overtake it - I'll be glad. Feel free to use code from proposed plugins if you'll find them useful.

@kelvinst

This comment has been minimized.

Show comment Hide comment
@kelvinst

kelvinst Aug 30, 2013

Nice man, I'll take a look at to help on this when I finish my current PR... (=

Nice man, I'll take a look at to help on this when I finish my current PR... (=

@parkr

This comment has been minimized.

Show comment Hide comment
@parkr

parkr Aug 14, 2014

Owner

If anyone watching this issue has the time or interest to create a category & page generator plugin, I'd love to take a look at it and possibly include it in core.

Owner

parkr commented Aug 14, 2014

If anyone watching this issue has the time or interest to create a category & page generator plugin, I'd love to take a look at it and possibly include it in core.

@alfredxing

This comment has been minimized.

Show comment Hide comment
@alfredxing

alfredxing Aug 14, 2014

Member

I would be willing to work on this. I have a question though—what is the difference between a 'tag' and a 'category', and how should Jekyll distinguish between the two?

Member

alfredxing commented Aug 14, 2014

I would be willing to work on this. I have a question though—what is the difference between a 'tag' and a 'category', and how should Jekyll distinguish between the two?

@kleinfreund

This comment has been minimized.

Show comment Hide comment
@kleinfreund

kleinfreund Aug 14, 2014

Contributor

I'm not sure if there is a definitive difference, but if I were to guess: Only one category applies to a post, but a post can have multiple tags.

Contributor

kleinfreund commented Aug 14, 2014

I'm not sure if there is a definitive difference, but if I were to guess: Only one category applies to a post, but a post can have multiple tags.

@alfredxing

This comment has been minimized.

Show comment Hide comment
@alfredxing

alfredxing Aug 14, 2014

Member

I guess I won't worry about it too much, since each Post object has a categories and a tags attribute. I'll just use those.

Member

alfredxing commented Aug 14, 2014

I guess I won't worry about it too much, since each Post object has a categories and a tags attribute. I'll just use those.

@kleinfreund

This comment has been minimized.

Show comment Hide comment
@kleinfreund

kleinfreund Aug 14, 2014

Contributor

What I said doesn't apply to Jekyll, of course. One post can indeed have multiple categories. But should it?

Contributor

kleinfreund commented Aug 14, 2014

What I said doesn't apply to Jekyll, of course. One post can indeed have multiple categories. But should it?

@alfredxing

This comment has been minimized.

Show comment Hide comment
@alfredxing

alfredxing Aug 14, 2014

Member

Wouldn't make a lot of sense to have multiple categories for one post (that's what tags are for, after all), but it's probably not in the scope of this issue to decide that. I'm sure there's a solid rationale behind the original decision.

Member

alfredxing commented Aug 14, 2014

Wouldn't make a lot of sense to have multiple categories for one post (that's what tags are for, after all), but it's probably not in the scope of this issue to decide that. I'm sure there's a solid rationale behind the original decision.

@alfredxing alfredxing referenced this pull request Aug 15, 2014

Closed

Add archive functionality #2755

2 of 4 tasks complete
@steelman

This comment has been minimized.

Show comment Hide comment
@steelman

steelman Sep 15, 2014

Contributor

Categories are ordered and tags are not. Categories provide a tree like structure while tags link posts to a number of different ... sets.

Contributor

steelman commented Sep 15, 2014

Categories are ordered and tags are not. Categories provide a tree like structure while tags link posts to a number of different ... sets.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.