-
Notifications
You must be signed in to change notification settings - Fork 466
Add external_url metadata item, for off-site entries #3863
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
base: master
Are you sure you want to change the base?
Conversation
Fix getnikola#3862. Signed-off-by: Joshua Wise <joshua@joshuawise.com>
Argh, of course, this almost worked, up until I added a new file that previously didn't exist as a cached item, and then I run into:
So that'll probably require at least one more task to generate. I'm tired and I'll figure that out tomorrow :) |
Hm, I looked at this and I am having a little bit of trouble figuring out how to wire up a compile-only task in this case. Extra frustrating is that I can work around it by running Nikola twice, which gives me not much incentive to fix it right :-) Does anyone have any suggestions? |
Requiring to run Nikola twice is not acceptable for a feature that would exist in Nikola core. This feature may require more thought and development. Nikola is not really designed for posts that do not have a corresponding HTML file, so this feature breaks a lot of assumptions. |
Yeah, obviously I would need to fix that before it is mergeable. If anyone has any suggestions on how I would very much appreciate it, though :)
I thought that too, but then I looked some more, and found that although it would certainly make for some UX strangeness with some themes (especially around 'previous post' and 'next post'), it might not be fatal for people who don't plan to use those links in themes. Are there other assumptions I'm missing? The core idea here is basically to make the surgical change of moving a permalink elsewhere (non-Nikola-owned) -- with "if it breaks, you get to keep both pieces" consequences for a user who wants to do that. |
I don’t think we should be adding new features that are easily breakable and not compatible with the default themes. An easier approach might be to have a post with some content (that describes the linked page), but also make links in important places (e.g. feeds) go to the external location. |
Ok, this is a really important use case for me, and I would really like to not have to maintain a private fork that holds just one patch, so I would definitely like to figure out how we can make this mergeable :) I definitely do not want to generate a post of any kind at all in the target output or in the sitemap, though I'm OK having one appear in the cache/ directory. How about if I changed the next_post and prev_post generator to skip over things with external_urls? |
If what you want is so that some specific posts are not ever generated in
the site but *are* generated in the RSS feeds, you can implement a plugin
that overloads the RSS generation and adds more stuff in it.
…On Sun, Sep 21, 2025 at 7:21 PM Joshua Wise ***@***.***> wrote:
*jwise* left a comment (getnikola/nikola#3863)
<#3863 (comment)>
Ok, this is a really important use case for me, and I would really like to
not have to maintain a private fork that holds just one patch, so I would
definitely like to figure out how we can make this mergeable :)
I definitely do not want to generate a post of any kind at all in the
target output or in the sitemap, though I'm OK having one appear in the
cache/ directory. How about if I changed the next_post and prev_post
generator to skip over things with external_urls?
—
Reply to this email directly, view it on GitHub
<#3863 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMK3Q73I4SCDQ4TQIBBD3T4QGFAVCNFSM6AAAAACHCMQ4Y6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMJWGMYDEMJRGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
We don't advertise it but 90% of the nikola innards are just plugins and if
you create one with the same name in your plugins/ folder it will have
priority over the one in core.
On Sun, Sep 21, 2025 at 9:31 PM Roberto Alsina ***@***.***>
wrote:
… If what you want is so that some specific posts are not ever generated in
the site but *are* generated in the RSS feeds, you can implement a plugin
that overloads the RSS generation and adds more stuff in it.
On Sun, Sep 21, 2025 at 7:21 PM Joshua Wise ***@***.***>
wrote:
> *jwise* left a comment (getnikola/nikola#3863)
> <#3863 (comment)>
>
> Ok, this is a really important use case for me, and I would really like
> to not have to maintain a private fork that holds just one patch, so I
> would definitely like to figure out how we can make this mergeable :)
>
> I definitely do not want to generate a post of any kind at all in the
> target output or in the sitemap, though I'm OK having one appear in the
> cache/ directory. How about if I changed the next_post and prev_post
> generator to skip over things with external_urls?
>
> —
> Reply to this email directly, view it on GitHub
> <#3863 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAAMK3Q73I4SCDQ4TQIBBD3T4QGFAVCNFSM6AAAAACHCMQ4Y6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMJWGMYDEMJRGQ>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
The thing I'm really looking for in this case is that I want page lists and tag lists to include other things that don't exist inside the Nikola world. For instance, here are some files that I have created that use this feature:
These are basically stubs, but it is important to me that they all show show up in Similarly, I also used a custom post-list to render some of my favorite things I've put together as a list my home page. The example, for instance:
Is rendered by a custom post-list:
Which uses the following in its guts:
Does this make somewhat more sense in what I am trying to achieve? |
Pull Request Checklist
Description
Implements #3862 with a tag
external_url
to represent "metadata-only entries".I've tried to follow the CONTRIBUTING.rst guidelines for this, but please let me know if I screwed something up! This, at least, passes pytest, and works in my test site.