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
Override page 'url' and 'save_as' directly from the page metadata #623
Conversation
this is similar to the template override implemented in getpelican#404
and update functional tests output
Docs are still missing in this pr. |
I've also seen that @michaelreneer had asked for this feature on irc tonight. Here is his use case: |
Now with some documentation: 802c9d1. |
I'd like my site's main page ( I use All this sounds over-complex to me. The notmyidea theme lists the articles on the index/front page, making it work otherwise through config options sounds like abusing the theme to me. |
@elemoine I'm not sure to understand what you want to say with your previous message. Is there a problem? Are you suggesting to fix things differently? |
Sorry for being unclear. I think this pull request does provide a relevant feature. I'm just saying that having many |
I completely agree, the themes are, or at least should be the main extension point of pelican |
Thanks for confirming. The docs say that the "simple" theme can be extended through inheritance. Wondering why this isn't the case for notmyidea, and other themes. I'll investigate. Thanks again. |
This sounds useful, but if you just want to change the content of the index page, you can just edit the content block, though I don't believe there is a way right now to slip in a specific article, maybe if you import the a page specific template? |
@bbinet / @ametaireau: This seems to allow people to use an arbitrary page as their home page, which many folks have requested. Docs are there, tests are passing. Any reason not to merge now? |
I'm the one who submitted ths PR, so I'm of course +1 to merge :-) This was just waiting for a review from somebody else. |
Works very well in my testing. Nice job, Bruno! 😄 The only minor hiccup, and it's by no means a blocker, is when I change the metadata in the
... the URL in the top nav for Home is: http://localhost:8000// (note the extra slash) As a workaround, when I set the metadata to:
... then the URL appears as I expect: http://localhost:8000/ When I tested on my own site content, which uses "clean" URLs, I did not experience the double-slash and did not need the above workaround. Like I said, I don't consider this to be a blocker. Just thought I'd pass along the results of my testing. |
As noted previously, I've tested this feature and have found it functions according to expectations. Given that this feature is requested on a near-daily basis, it seems it will help a great many folks. Merging. |
Override page 'url' and 'save_as' directly from the page metadata. Fixes #400.
In some cases, we'd like to be able to output a specific article or page to a different url that the one which is specified in the
ARTICLE_URL
/ARTICLE_SAVE_AS
orPAGE_URL
/PAGE_SAVE_AS
setting.One typical use case is the ability to set a specific page as index instead of the articles list, so this will address #400.