Package: minchin.pelican.readers.microblog
A Pelican plugin providing “microblogging” capabilities.QuickstartInstall the plugin via pip:pip install minchin.pelican.readers.microbloggingGenerally, the plugin should be loaded and configured automatically without
further effort on your part.Create amicrofolder in your content folder (to hold your micro blog
posts!).Create a new post in yourmicrofolder. This can be generally be just
the text (body) of your post. In terms of metadata,titleis unneeded
(and ignored),slugwill be auto-generated (based on the post date), anddatewill determined from the file creation datetime of the post file.
If you provide thedate, it must be on the first line, inkey: valueformat. The text body will be read as Markdown (so plain text effectively
works too)!Regenerate your Pelican site!Sample (Micro) Post File<!-- ./content/micro/202307091701.md -->date: 2023-07-09 17:01+0600I'm microblogging with Pelican!https://blog.minchin.ca/label/microblogging-pelicanOr a post with an image:<!-- ./content/micro/202307112138.md -->date: 2023-07-11 21:38-0600image: images/birger-strahl-olI66vtMgNo-unsplash.jpgMicroblog posts can have "feature" images too! (URL of photo shouldautomatically be added.)The image path is relative to yourcontentfolder. A URL of the photo is
added to the end of the post as well.Or with tags (or hashtags):<!-- ./content/micro/202307131456.md -->date: 2023-07-13 14:56 -0600tags: Python, Pelican, MicrobloggingI'm now Microblogging with Pelican!This will add links at the end of your post to the tags to the tag page for
your (Pelican) site.For now, it does not pull tags out of the body of your post.Background Notes (on Micro Blogging)Microblogging is here considered to be blog posts, but very short in length.The most common example is Twitter, with an original limit of 140 characters
(to be less than the SMS max of 160 characters). Twitter has since doubled
their limit to 280 characters. The default on Mastodon is 500 characters, the
same as (newly released) Threads. (Note that on Twitter, all links are run
through a shortener and so are considered 23 characters long.) Here, the
default soft limit is 140 characters. You can choose to ignore that, or set a
higher limit (viaMICROBLOG_MAX_LENGTH), but there are certain assumptions
about presentation that start to fail as the posts get longer….InstallationThe easiest way to installedMicrobloggingis throughpip:pipinstallminchin.pelican.reader.microblogRequirementsMicrobloggingrelies on Pelican, and theautoloaderplugin (for
autoloading). If this plugin is installed from PyPI, these should automatically
be installed.if you need to insrall them manually:pipinstallpelicanpipinstallminchin.pelican.plugins.autoloaderAdditional ImagesMicro blog post, using the Seafoam theme:(Placeholder image for the moment…)Pelican SettingsThese settings can be set in yourpelicanconf.pyfile (your Pelican settings
file) to alter the behavior of the plugin.If a value is given below, this represents the effective default value. If no
value is given, the effective default value isNone.Microbloggingalso auto-configures itself when possible.  If you need to
manually create the default configuration, you would need the following:# pelicanconf.py# if PLUGINS is not defined on Pelican 4.5+, these plugins will autoloadPLUGINS=["minchin.pelican.readers.microblog",# others, as desired...]# the rest of the your configuration file...This documentation has to be manually updated. If the settings no longer match
the plugin’s behavior, or a setting is missing from here, please open a ticket
onGitHub.MICROBLOG_FOLDER = “micro”Folder containing your micro blog posts, relative to your content root.MICROBLOG_MAX_LENGTH = 140How long should your micro blog posts ve limited to. Pelican will emit a
warning if you exceed this.MICROBLOG_SAVE_AS = ARTICLE_SAVE_ASWhat to save the micro blog posts output file as. Defaults to using the same
file structure as you are using for articles. c.f.MICROBLOG_URL.MICROBLOG_SLUG = “u{date:%Y%m%d%H%M}”The slug that will be used for micro blog posts. Eg.u202307091701.Note that Pelican expects slugs to be universally unique.MICROBLOG_URL = ARTICLE_URLWhat URL to post the micro blog posts to. Defaults to using the same URL
structure as you are using for articles. c.f.MICROBLOG_SAVE_AS.Integration with ThemesFor best support, you will need to modify your theme, or select a theme that
already supportsMicroblogging, like myseafoam.Some helpful notes:Microblog posts are consideredArticlesby Pelican, and will be included
in thearticlesanddates“lists”.Microblog posts all havearticle.micro = True.Microblog posts are added to theÂµcategory.Generally, you’ll want to disregard and now show the title of the microblog
post. The title is set to the slug.Because of their short length, it may make sense to display the whole body
(article.content) in places that a link via the title of the article is
typically shown.ChangelogChangelogRoadmapThese are features that I would like to eventually add to the plugin (and the
issues I’m using to track their progress):Issue 1– count links as 23 characters (Ã  laTwitter)Issue 2– process ReST microblog postsIssue 3– CLI command to create micropostsIssue 4– add link previewsIssue 5– show (if applicable) that this is a reply to something (or a “re-tweet”)Issue 6– show replies to each post (borrow the comment setup?)Issue 7– automatically add hashtags as (Pelican) tagsPull Requests to implement any of these are welcomed![x] update Seafoam theme[x] make sorting work for microblog postsKnown IssuesProcessing relies on Pelican’s built-in Markdown reader.The length of links to featured images will change if theSITE_URLchanges. This can mean that the microblog post is “short” enough when
reviewing your site locally, but not when the site is generated for
publication.