From f6d2141a480dd6b5b8ee0e48d43bb64773232791 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 26 Mar 2024 23:38:14 -0600 Subject: add header ids --- docs/posts/2022-12-25-blog-to-toot.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'docs/posts/2022-12-25-blog-to-toot.html') diff --git a/docs/posts/2022-12-25-blog-to-toot.html b/docs/posts/2022-12-25-blog-to-toot.html index f978e30..4d9eb10 100644 --- a/docs/posts/2022-12-25-blog-to-toot.html +++ b/docs/posts/2022-12-25-blog-to-toot.html @@ -6,13 +6,13 @@ - Posting blogs as Mastodon Toots + id="posting-blogs-as-mastodon-toots">Posting blogs as Mastodon Toots - - + Posting blogs as Mastodon Toots" /> + Posting blogs as Mastodon Toots" /> @@ -44,16 +44,16 @@
-

Posting blogs as Mastodon Toots

+

Posting blogs as Mastodon Toots

What is better than posting a blog post? Posting about your posting pipeline. I did this previously with Twitter.

-

the elephant in the room

+

the elephant in the room

mastodon.social does not support any formatting in the status posts. Yes, there are other instances which have patches to enable features such as markdown formatting, but there is no upstream support.

-

time to code

+

time to code

My website is built using a really simple static site generator I wrote in Python. Therefore, each post is self-contained in a Markdown file with the necessary metadata.

@@ -62,13 +62,13 @@ Therefore, each post is self-contained in a Markdown file with the necessary met

I initially planned on having a command line parser and some more flags.

-

interacting with mastodon

+

interacting with mastodon

I ended up using mastodon.py rather than crafting requests by hand. Each statuspost/toot call returns a statusid that can be then used as an inreplyto parameter.

For the code snippets, seeing that mastodon does not support native formatting, I am resorting to using ray-so.

-

reading markdown

+

reading markdown

I am using a bunch of regex hacks, and reading the blog post line by line. Because there is no markdown support, I append all the links to the end of the toot. @@ -97,7 +97,7 @@ In this case, I can extract the tags from the front matter.

-

code snippet support

+

code snippet support

I am running akashrchandran/Rayso-API.

@@ -117,19 +117,19 @@ In this case, I can extract the tags from the front matter.

-

threads! threads! threads!

+

threads! threads! threads!

Even though mastodon does officially have a higher character limit than Twitter. I prefer the way threads look.

-

result

+

result

Everything does seem to work! Seeing that you are reading this on Mastodon, and that I have updated this section.

-

what's next?

+

what's next?

Here is the current code:

-- cgit v1.2.3