Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the subindexes plugin. #67

Merged
merged 2 commits into from Jul 5, 2015
Merged

Add the subindexes plugin. #67

merged 2 commits into from Jul 5, 2015

Conversation

@bwinton
Copy link
Contributor

@bwinton bwinton commented Jan 26, 2015

One of the things I missed from PyBlosxom was a sub-index listing all the posts underneath a subdirectory.
So I wrote this. :)

Any suggestions about how to make it better would be greatly appreciated!

Review on Reviewable

@bwinton
Copy link
Contributor Author

@bwinton bwinton commented Jan 26, 2015

(Uh, that error doesn’t seem like something I caused…)

@@ -0,0 +1,74 @@
# -*- coding: utf-8 -*-

This comment has been minimized.

@Kwpolska

Kwpolska Jan 26, 2015
Member

missing a license

(can be anything you like)

@@ -0,0 +1,74 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

This comment has been minimized.

@Kwpolska

Kwpolska Jan 27, 2015
Member

more like

# Copyright © 2015 Blake Winton.

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Jan 27, 2015

It looks like this plugin completely ignores archives. You can easily have a blog which has indexes already there.

For example, my blog has https://chriswarrick.com/blog/2014/ and also https://chriswarrick.com/blog/2014/11/09/inbox-review/ via archives and posts/ structured mirrored in output.

@bwinton
Copy link
Contributor Author

@bwinton bwinton commented Jan 27, 2015

Neat. How did you get https://chriswarrick.com/blog/2014/11/09/inbox-review/ to show up there? Is the inbox-review post in a "2014/11/09" directory?

(Also, that seems to solve a slightly different problem than the one I was trying to solve, since I want the sub-indexes to show up, and https://chriswarrick.com/blog/2014/11/ doesn't show all the posts in 2014/11… :)

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Jan 27, 2015

  1. Yes, the path is posts/2014/11/09/inbox-review.rst (/blog/ is handled by POSTS)
  2. 2014/11 does not work because I didn’t enable CREATE_MONTHLY_ARCHIVES, which is overkill for small blogs. I could also enable ARCHIVES_ARE_INDEXES and CREATE_DAILY_ARCHIVES for a better effect.
  3. Still, your plugin should check that it doesn’t conflict with archives. Otherwise, a nice error will prevent the site from building due to two tasks having the same target.

@bwinton
Copy link
Contributor Author

@bwinton bwinton commented Jan 27, 2015

Ah! Yes! I should definitely make it check for that.
Is there a clean way to say "Does this target already exist?" (or "Is another plugin going to handle this target?") so that I can skip generating it? (That would let me avoid the check at https://github.com/bwinton/plugins/blob/master/v7/subindexes/subindexes.py#L58 too!)

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Jan 27, 2015

No, you’d have to check possibilities manually, according to current archive settings.

Kwpolska added a commit that referenced this pull request Jul 5, 2015
Add the subindexes plugin.
@Kwpolska Kwpolska merged commit d444034 into getnikola:master Jul 5, 2015
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@bwinton bwinton deleted the bwinton:master branch Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants