Create TiddlyWiki sitemap

310 views
Skip to first unread message

Anne-Laure Le Cunff

unread,
Apr 25, 2020, 1:44:07 PM4/25/20
to TiddlyWiki
Hi everyone,

I added the following command to my build.sh file in order to generate a sitemap of my TiddlyWiki static website:

--rendertiddler sitemap sitemap.xml text/plain

So my full render command looks like this now:

tiddlywiki --rendertiddlers [!is[system]] $:/ness_labs/templates/static.tiddler.html static text/plain --rendertiddler $:/ness_labs/templates/static.template.css static/static.css text/plain --rendertiddler sitemap sitemap.xml text/plain

I do get a sitemap.xml file, but it's empty. Is there anything else I should do beside using this command?

(all of this will be going into a SEO guide for TW btw!)

Thank you!
Anne-Laure.


Saq Imtiaz

unread,
Apr 26, 2020, 6:39:29 AM4/26/20
to TiddlyWiki
What plugin are you using for the sitemap? As far as I am aware, there is no built in support in TiddlyWiki for generating a sitemap.

Regards,
Saq

Anne-Laure Le Cunff

unread,
Apr 26, 2020, 10:26:45 AM4/26/20
to TiddlyWiki
Ha, I used this but looks like I missed some steps! I somehow thought it was a native functionality. Thank you!

Anne-Laure Le Cunff

unread,
May 14, 2020, 7:34:05 AM5/14/20
to TiddlyWiki
I managed to make it work but my sitemap won't sanitize the links.

Inside sitemapentries.js.tid I changed this part:

x += "\t\t<loc>" + server + element.title.replace(/ /g,"%2520") + ".html</loc>\n";

To this:

x += "\t\t<loc>" + server + element.title.replace(/[\s]/gi,'-').replace(/[^a-z0-9\-.+]/gi,'') + ".html</loc>\n";

But I don't see any changes in the final output.

Does anyone have any idea what I'm doing wrong here?

Thank you!

Saq Imtiaz

unread,
May 14, 2020, 9:11:44 AM5/14/20
to TiddlyWiki
@anne-laure I can't take a look at the code just yet, but have you made sure to start and stop the node server again? (This assumes you edited via TiddlyWiki and not the file directly in a text editor)

Anne-Laure Le Cunff

unread,
May 14, 2020, 2:16:03 PM5/14/20
to TiddlyWiki
I edited straight from VS Code - I didn't know that made any difference, let me try from TW and restart the server. Thank you!

Saq Imtiaz

unread,
May 14, 2020, 2:58:12 PM5/14/20
to TiddlyWiki
It shouldn't but I am wondering if by any chance you have two copies of the plugin and editing the wrong one.

Find the plugin js tiddler in your TW and verify that you can see your changes there.

Anne-Laure Le Cunff

unread,
May 14, 2020, 4:32:32 PM5/14/20
to TiddlyWiki
I feel like I should know where to look, but I can't find this in the plugins area. Where am I supposed to look for this plugin's tiddler? (see screenshot attached)

Thank you!
Screenshot 2020-05-14 at 9.30.58 PM.png

Saq Imtiaz

unread,
May 14, 2020, 4:36:19 PM5/14/20
to TiddlyWiki
It might not be properly packaged as a plugin.

In Advanced Search, search for:
sitemapentries.js

If it doesn't show up, also check the different tabs (system, shadow etc)

Anne-Laure Le Cunff

unread,
May 15, 2020, 11:29:54 PM5/15/20
to TiddlyWiki
It doesn't show up anywhere — what do you mean by "not properly packaged"?

Thank you!

Scott Kingery

unread,
May 16, 2020, 11:15:44 AM5/16/20
to TiddlyWiki
I haven't announced this in the group yet but I just built a plugin. It builds sitemaps, rss and atom feeds for static sites. My first plugin! It also has a separate static.tiddler.html that auto-populates with the site title and subtitle so you don't have to edit those bits like in the instructions you wrote. If it feels like something you want to try, it's here: https://techlifeweb.com/tiddlywiki/xmlbuilder.html  

Mohammad

unread,
May 16, 2020, 11:36:51 AM5/16/20
to TiddlyWiki
WOW!

Congrats Scott! You did amazing as always! Thank you for sharing!
It deserves to have a dedicated thread for announcement!
Love it! I may have small comments send to you after enough evaluations!

Best wishes
Mohammad

Tony K

unread,
May 16, 2020, 3:56:14 PM5/16/20
to TiddlyWiki
Thanks for sharing
Reply all
Reply to author
Forward
0 new messages