Replies: 2 comments 1 reply
-
|
You may want to look at the continuous_import plugin, I use that to keep
goodreads and youtube content mirrored into nikola
…On Sat, Sep 20, 2025 at 4:42 AM Joshua Wise ***@***.***> wrote:
Hi all,
I'm migrating my long-beleaguered web presence to the static site
generation future, and one thing I'm excited about is being able to write
things and then have them automatically show up in tag maps, chronological
post indices, etcetera.
As I was migrating content over, I was thinking that it would be cool if
*all* of my artifacts over the last handful of decades could be
represented in chronological indices, without necessarily having to port
them into the SSG directly. For instance, I have some stuff still on
Dreamwidth, and some photo galleries with other canonical URLs that I don't
plan to import into Nikola, and I'd like for these all to have metadata
represented in Nikola, but not any generated pages.
For extremely small and limited things, where I want to create a small
list of "favorites", I have something like this:
Here are some favorites and/or classics.
{{% post-list post_type=all tags=favorites template=favorites.tmpl %}}{{% /post-list %}}
And then in templates/favorites.tmpl:
## -*- coding: utf-8 -*-
<%block name="content">
<!-- Begin post-list ${post_list_id} -->
<div id="${post_list_id}" class="post-list">
%if posts:
<ul class="post-list">
% for post in posts:
<li class="post-list-item">
${post.formatted_date("MMMM yyyy")|h}
%if post.meta('link'):
<a href="${post.meta('link')}">
%else:
<a href="${post.permalink(lang)}">
%endif
${post.title(lang)|h}</a>
%if post.meta('why-favorite'):
-- ${post.meta('why-favorite')|h}
%endif
</li>
% endfor
</ul>
%endif
</div>
<!-- End post-list ${post_list_id} -->
</%block>
And, finally, a "stub metadata file",
pages/external/near-miss-data-loss.md:
<!--
.. title: A near-miss data loss event
.. date: 2012-02-03 04:06:44 UTC-04:00
.. tags: favorites
.. category:
.. link: https://joshua0.dreamwidth.org/25045.html
.. why-favorite: or, how I accidentally paved over a machine
.. description:
.. type: external
-->
But this still does not really solve the problem of making that link: be
the canonical URL in other indices -- and convincing Nikola to skip
generating the output file.
Does anyone have any ideas for how I could achieve this effect in post
lists all over Nikola, not just in carefully-hacked templates?
Thanks,
joshua
—
Reply to this email directly, view it on GitHub
<#3861>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMKZH6VCY2B673SRBMH33TUAODAVCNFSM6AAAAACHA5NWTSVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYHEZDENBTGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm migrating my long-beleaguered web presence to the static site generation future, and one thing I'm excited about is being able to write things and then have them automatically show up in tag maps, chronological post indices, etcetera.
As I was migrating content over, I was thinking that it would be cool if all of my artifacts over the last handful of decades could be represented in chronological indices, without necessarily having to port them into the SSG directly. For instance, I have some stuff still on Dreamwidth, and some photo galleries with other canonical URLs that I don't plan to import into Nikola, and I'd like for these all to have metadata represented in Nikola, but not any generated pages.
For extremely small and limited things, where I want to create a small list of "favorites", I have something like this:
And then in
templates/favorites.tmpl:And, finally, a "stub metadata file",
pages/external/near-miss-data-loss.md:But this still does not really solve the problem of making that
link:be the canonical URL in other indices -- and convincing Nikola to skip generating the output file.Does anyone have any ideas for how I could achieve this effect in post lists all over Nikola, not just in carefully-hacked templates?
Thanks,
joshua
Beta Was this translation helpful? Give feedback.
All reactions