theowenyoung
Joined 6 years ago
Joined 6 years ago
This month has mostly been about adding multilingual support to Jant. It's for bilingual authors — the common case being someone writing for both Chinese and English readers — so they can publish to each language's audience separately within Jant.
I'm also designing a feature called Repost: when you see a post you like on another blog, you can repost it to your own Jant blog along with the original URL.
Code's on GitHub [1], and there's a demo [2] to try it out.
[0] https://jant.me [1] https://github.com/jant-me/jant [2] https://demo.jant.me
I use Substack for email distribution too. For the website side, I built an open-source blogging platform called Jant (https://jant.me) around these needs: posts appear on the homepage by default, posts marked as Featured are included in RSS, and posts can also be unlisted. It also syncs everything to GitHub as Markdown, in a repo that works as a complete Hugo site.
One of the features is that every edit auto-syncs to a GitHub repo as Markdown, and the repo itself is a full Hugo site you can build independently. So the backup is always there without thinking about it.
Not released yet but almost done. Repo is public if you want to take a look.
CronBin: https://github.com/theowenyoung/blog/tree/main/scripts/cronb...
Both scripts are deployed as single file js in the free tier of Cloudflare's Workers, and my personal workflow relies on these two simple services for all persistent data storage and scheduled tasks.
async function handleRequest(request) {
const requestUrl = new URL(request.url);
let target = "https://github.com/theowenyoung?tab=repositories"
if(requestUrl.pathname!=="/"){
target = "https://github.com/theowenyoung"+requestUrl.pathname
}
return Response.redirect(target, 302);
}
addEventListener('fetch', async event => {
event.respondWith(handleRequest(event.request));
});
[0]: https://git.owenyoung.com