其实我非常喜欢 RSS,非常推荐大家也尝试 RSS。
RSS 让我们可以从容不迫地面对信息轰炸,让我们免于被算法洗脑,让我们成为我们自己。
TJ
feed: https://thaddeusjiang.com/rss.xml
我是如何实现 RSS 的?
Step 1: 实现一个 TiddlyWiki render
created: 20200913085259429
modified: 20201117084124255
revision: 0
tags: $:/plugins/adithyab/tiddlyjam/internals
title: $:/plugins/adithyab/tiddlyjam/renderer/rss
type: text/vnd.tiddlywiki
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{$:/SiteTitle}}</title>
<link><$text text={{$:/AbsoluteBaseUrl}}/></link>
<atom:link href="<$text text={{$:/AbsoluteBaseUrl}}/>/rss.xml" rel="self" type="application/rss+xml" />
<description>{{$:/SiteSubtitle}}</description>
<$list filter="[tag[$:/plugins/adithyab/tiddlyjam/live]!sort[title]]">
<item>
<title>{{!title}}</title>
<link><$text text={{$:/AbsoluteBaseUrl}}/>/<$macrocall $name="tv-get-export-path" title={{!title}}/></link>
<guid><$text text={{$:/AbsoluteBaseUrl}}/>/<$macrocall $name="tv-get-export-path" title={{!title}}/></guid>
</item>
</$list>
</channel>
</rss>
Step 2: 修改 tiddlywiki.info
{
"description": "Basic client-server edition",
...
"build": {
...
"tiddlyjam":[
"--rendertiddlers",
"[all[tiddlers+shadows]tag[$:/plugins/adithyab/tiddlyjam/live]]",
"$:/plugins/adithyab/tiddlyjam/renderer/base",
".",
"text/plain",
"--render",
"[all[tiddlers+shadows][$:/plugins/adithyab/tiddlyjam/renderer/sitemap]]",
"sitemap.xml",
"text/plain",
+ "--render",
+ "[all[tiddlers+shadows][$:/plugins/adithyab/tiddlyjam/renderer/rss]]",
+ "rss.xml",
+ "text/plain",
"--render",
"[all[tiddlers+shadows]tag[$:/plugins/adithyab/tiddlyjam/css]]",
"[encodeuricomponent[]addprefix[css/]]",
"text/plain"
]
}
}
Step 3: 执行
tiddlywiki --build tiddlyjam
我已经将代码提交到 TiddlyJam,目前还没有 merge。如果你想提前使用,请查看 https://github.com/ThaddeusJiang/tiddlyjam。