-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 metadata for custom page ordering #420
Comments
+1 :) |
Ok! Its on my todo list |
Included for 3.1 |
@tbunnyman: Do you think you can find some time to work on this issue? Just trying to plan the next release. 😄 |
I've just added a pull request with a fix. This change makes the default sorting order for pages their filenames (new). The default sorting order for articles is still by slug (same as before). But you can tweak how either is sorted in your
In this case, just make sure that all pages have the metadata attribute 'page-order'. Advanced: You could also use a sorting function. See the code for an example, as a sorting function is used to get filenames based on the |
This new pull request seems to do it. Hopefully it's accepted. |
This interest me and when I will have a little time I may rework this. Still, I would like to propose a slightly different implementation:
|
I've merged @davidmarble work and @malept tests against current master in #1348 Works like a charm for me. |
Feature merged and will be included in Pelican 3.5. Thanks to everyone for their input, contributions, and patience. |
It may sounds exaggerated, but this is a HUGE improvement to non-blog site projects in Pelican. This feature deserves a better explanation in the docs, maybe a full paragraph. Thank you very much! |
I gave this a try and it didn't work! Then I realized that is because the template which I am using also sort the pages! |
raignarok in IRC gave me this idea for this feature so I am documenting it.
:page-order: #
metadata for pagespage-order
metadata that doesn't cast properly to a number throws a warning and discards the metadatapage-order
metadata go first in the list, sorted in ascending numerically.This will probably go nicely with #400 and #220 since pages and the location of articles will be way more flexible.
The text was updated successfully, but these errors were encountered: