#sphinxDoc

sphinx-fediverse 0.9.0 is now released. This is likely the last beta release. Since the previous version...

New features:
- Per-directive overrides of global options
- Automatic linting of CSS
- Ability to use multiple fedi instances/flavors in one project
- Significantly increase support for Misskey Flavored Markdown (blur, flip, scale, bg/fg color, ruby text, font, border)
- Significantly more tests (overall code coverage ~70%)

Bug fixes:
- Fix some MFM rendering errors
- Fix Misskey not reporting global boosts correctly

#Python #SphinxDoc #FOSS #FLOSS #OSS #FediBridge #Mastodon #Misskey #Sharkey #Fediverse #Fedi

Discussion post for Developing sphinx-fediverse

--------------------------

A few months ago, I had an idea. What if I could use the Fediverse to embed comments in my sphinx-generated pages?

It turned out I wasn’t the first to think of this. Many others have used this kind of thing to power the comments of their blogs. Enough so that it was easy to find references on how to implement it.

The main difficulty was the way I wanted to go about it. I wanted it to be a sphinx plugin, and I wanted it to be both flexible and configurable. This post covers the challenges I encountered.

#Python #SphinxDoc #FOSS #FLOSS #OSS #FediBridge #Mastodon #Misskey #Sharkey #Fediverse #Fedi #JavaScript

2025-03-23

Ja się nie dziwię że programiści nie chcą dokumentować swoich programów. Weź ustaw sfinksa że wszystkimi plaginami 🤦

#programowanie #sphinxdoc

sphinx-fediverse 0.8.0 is now released. Since the previous version...

New features:
- Support for custom emoji in non-reaction content on Misskey
- Support for individual media to be marked as sensitive (mostly in Misskey)
- Support for account-wide content warnings in Misskey
- Comment parsing now done with async methods

Bug fixes:
- Corrected a typo in article reaction rendering
- More CSS changes related to word wrap
- Fixed a bug in
replaceEmoji() that caused only the first paragraph of posts to be rendered

Likely next steps:
- Custom emoji in reactions
- Find a better way to sanitize Misskey posts
- Verify that Mastodon actually returns sanitized HTML (and remove the worst parts if not)
- Adapt
replaceEmoji() to directly produce DOM elements instead of relying on the parser

Special thanks to
@hazelnoot@enby.life for pushing me to rewrite the render code

#Python #SphinxDoc #FOSS #FLOSS #OSS #FediBridge #Mastodon #Misskey #Sharkey #Fediverse #Fedi

sphinx-fediverse 0.7.0 is now released. Since the previous version...

New features:
- Improved rendering security! It no longer relies on a massive HTML template. Still some progress to make
- Support for unicode emoji reactions on Misskey instances
- If a comment is too wide for the page, it will now split the username, so:
@LivInTheLookingGlass@transfem.social will become @LivInTheLookingGlass\n@transfem.social
- Increased use of the comment parser to avoid ambiguities
- Comment posts will now include the title of the article and, if on Misskey, put the link on that text
- Misskey now supports the following parts of MFM:
- anything in standard Markdown
- mentions
- hashtags
-
<small>
-
<center>
-
<i>
-
<plain>

Bug fixes:
- Bumped the version of an insecure dependency

Extra shout-out to the people who "bullied" me into fixing the render code. It's not perfect, but it's a lot better now. Figuring out a better way to

1. sanitize MFM input
2. adapt
replaceEmoji() to work with DOM elements
3. get custom emoji working for Misskey instances

are probably the last real blockers before a 1.0 release. There's a few more Misskey-related things that would be nice, but it's mostly about increasing parity at that point

#Python #SphinxDoc #FOSS #FLOSS #OSS #FediBridge #Mastodon #Misskey #Sharkey #Fediverse #Fedi

Which of these issues should I tackle next? I leaning towards render support for emoji reactions (but not custom ones, because I still need to figure that out for Misskey)

https://github.com/LivInTheLookingGlass/sphinx-fediverse/issues/

#Python #SphinxDoc #FOSS #FLOSS #OSS #FediBridge #Mastodon #Misskey #Sharkey #Fediverse #Fedi

sphinx-fediverse 0.6.0 is now released. Since the previous version...

New features:
- (Standard) Markdown rendering for Misskey instances (more MFM support to come later)
- Support (in parser only) for emoji-based reactions
- Support (in parser only) for sensitive images among non-sensitive images
- Dump the post-to-page mapping to _static/ for ease of debug
- Support for reply handling on Misskey instances

Bug fixes:
- Icons previously wouldn't show for posts outside the root directory
- A typo led to a duplicate icon
- Shibuya dark now produces legible icons (and this should be portable to other themes)
- the hover effect no longer renders text unreadable on Shibuya dark (again, should be portable)

#Python #SphinxDoc #FOSS #FLOSS #OSS #FediBridge #Mastodon #Misskey #Sharkey #Fediverse #Fedi

And now sphinx-fediverse 0.5.3 is released. The big thing here is I've separated the rendering logic from comment parsing, so it's easier to support both flavors. Rendering is still pretty janky, but it's a good start towards the final setup.

Next on the list:
- *key media attachments
- better rendering code

#Python #SphinxDoc #FOSS #FLOSS #OSS #FediBridge #Mastodon #Misskey #Sharkey

And with that, sphinx-fediverse 0.5.2 is released with initial support for running on Misskey/*key instances.

Known bugs:
- Misskey instances cannot yet load custom emoji or media attachments
- CSS for Shibuya theme on Chrome seems to have some minor problems, specifically with the hover effect

Breaking changes:
- the comment directive is now
fedi-comments rather than mastodon-comments
- some config values have had their name changed
- you are now required to specify what flavor of fediverse instance you're hosting on

#Python #SphinxDoc #FOSS #FLOSS #OSS #FediBridge #Mastodon #Misskey #Sharkey

Good news! sphinx-fediverse is now on pypi!

https://pypi.org/project/sphinx-fediverse/

The project is not feature-complete yet, but it should be worth of the "beta" label
💖

#SphinxDoc #FediBridge #Fediverse #Python #FOSS #FLOSS

And now the last barrier to me publishing sphinx-fediverse is literally adding the "twine" line to my Makefile. I'll probably get this tomorrow, and maybe make an auto-publish script on GitHub as well

#SphinxDoc #FediBridge #Fediverse #Python #FOSS #FLOSS

I've now updated sphinx-fediverse to include boost and like counts, both per-comment and for the originating post. This means there are now only 2 barriers between me and throwing it on PyPi: cleaning up the remaining CSS errors, and writing the publish script

#SphinxDoc #FediBridge #Fediverse #Python #FOSS #FLOSS

New account, so new #introduction. Let's do it again!

I have a
#MastersDegree in #ComputerScience and #ComputerEngineering. I went to #NMU for undergrad and #MSU for my graduate degree. I currently work at #UChicago for the #TMWCenter, which focuses on helping young children acquire language (and therefore other learning skills) faster.

In my spare time, I develop
#OpenSourceSoftware such as
- a
#SphinxDoc extension that embed #Fediverse comments on your page
- a library to talk to
#ManifoldMarkets from native #Python
- a
#PredictionMarket manager using the above
- a
#transpiler from a subset of Python to #OpenStreetMaps's #OverpassQL
- bug fixes to many other projects, including
#mypy, #base58, #attrs, #CPython, & more

I spend a fair bit of my time these days on
#MathResearch, specifically into the #ThueMorse Sequence and its extensions.

I'm also a hobbyist editor on OpenStreetMap.

#Demisexual, #transfem, and happily engaged to my #enby sweetheart.

We have two cats:
#OpheTheLoaf and #MayalaranTheCat (yes, from #StormlightArchive) See here for more on them!

I speak English fluently, Spanish haltingly, and am trying to learn Chinese

#queer #Chicago

2025-02-19

This is the test post for the initial alpha of sphinx-fediverse!

oliviaappleton.com/sphinx-fedi

We're now on version 0.2.3, which adds support for automatic posting of comments sections + media attachment handling + unit tests

#SphinxDoc #Python #FediBridge #Fediverse #FOSS

A demonstration of the comments section in the Read the Docs theme. It features 3 posts by me. The first pair are threaded, to demonstrate support for that. The parent says "This comment should appear on the site!". The child says "As does this one, threaded!" A third post features a content warning "CW Demo", with the expanded text saying "And look, another with a content warning"This is much the same as the previous picture, except in the sphinxdoc themeThis is much the same as the previous picture, except in the shibuya (light) theme. It doesn't yet play well with shibuya darkThis is much the same as the previous picture, except in the bizstyle theme
2025-02-19

Have any of my followers ever needed to test a #sphinxDoc extension? I am having a remarkably hard time making it work

#sphinx #python #askPython #AskFedi

2025-02-17

This is my very-WIP #SphinxDoc extension to add comment sections hosted on the #Fediverse!

Right now it is a solid PoC, & I want to improve it a fair bit before publishing. Feel free to play with it!

Update: see here for more tech.lgbt/@LivInTheLookingGlas

#FediBridge #Python #FOSS

2025-02-15

@Unlogic
Now in a sphinx-generated doc!

Next problem is going to be making it play well with themes. That is definitely a for-later problem. I'm going to be focusing on making it work with shibuya and Dark Reader first, if possible.

If this works, all of my websites are going to instantly have comment sections! I build pretty much everything in Sphinx, since it's so easy

#SphinxDoc #Python #FediBridge #Fediverse

A screenshot of a page generated in Sphinx. It's incredibly plain, with no real content other than a comments section. The comments section is fetching its information from Mastodon.
2025-02-15

@Unlogic
Behold! The prototype!

#SphinxDoc #FediBridge

A prototype of a comment section embeddable in Sphinx documents. It shows a series of comments from myself, including the avatar, date, display name, handle, threading, and content warnings (collapsed by default)
2025-02-13

Suppose I want to put comments on my static sphinx site, and I want it to be sourced from the fediverse.

How difficult would this be? I would ideally like to support comment threading. I also might want to make this into a sphinx extension, such that it checks every page has a corresponding post before publishing. This would mean the URL needs to strictly define the post

#AskMastodon #AskFedi #SphinxDoc #AskSysadmin

2024-12-24

Does anyone know of a #Sphinx toolkit that would be good for writing a programmer's #portfolio / #resume? I would love it if my resume could be (in part) a living website generated by #SphinxDoc

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst