• As of today, Tanzawa officially supports IndieAuth and Micropub. Micropub is still a work-in-progress, but it works for basic note and articles with photos. I also pushed the RSS fix so _new_ posts with images should display properly for Feedly users. By the way - this post was made with Quill.
  • Figured out (I think) the issue with my Feedly feeds and images. I use BeautifulSoup and Django templates to rewrite the image tags generated by Trix to be lazy loading and offer optimized formats on the backend.

    picture = BeautifulSoup(
        render_to_string("trix/picture.html", context),"html5lib"
    )

    The issue is that the the "html5lib" causes my <figure> tag to be wrapped in <html> and <body> tags. Browsers are smart enough to filter this out. But these other parsers are not.

    Changing this line to use the "html.parser" prevents wrapping my template in html tags and should solve the issue.

    picture = BeautifulSoup(
        render_to_string("trix/picture.html", context), 'html.parser'
    )
  • Made good progress on the embed based64 image -> file save in tanzawa -> content rewrite. Now working on my handling of json micropub requests.Β 

    This handler is a bit large. I can't wait for it to be working so I can refactor it down to something a bit more manageable.
  • Checkin to ChΓ’teraisΓ© (γ‚·γƒ£γƒˆγƒ¬γƒΌγ‚Ό ζˆΈε‘šθΈŠε ΄εΊ—)

    in Yokohama, Kanagawa, Japan

    Birthday cake. πŸŽ‚

  • Those that are familiar with micropub know that there's two ways to use the endpoint. One is as a regular json api and the other is a plain-old form submit endpoint. Almost all integrations these days are done with json apis, so the idea of support a form api seems antiquated at first.

    But once you realize that any site can publish to your site, including file attachments(!), with a simple form on their website, it doesn't seem so antiquated after-all. It feels quite liberating. In fact, it may be my favorite part of micropub.

    Currently regular json requests can create a post. And form requests with file attachments can also create a post. Tanzawa automatically inserts the photo into the post and does its exif stripping, lazy loading, and other image loading optimizations.

    Testing with the Quill article interface - image attachments are sent in base64 encoded strings in the img tag. Extracting those images, saving them to disk, and rewriting the html will take me another day to complete.

    ---

    Feedly is still mangling my posts. Besides the figure tag messing things up for feedly, another theory I have is that it doesn't like text content not wrapped in a <p> tag. Trix (the editor Tanzawa uses) wraps all content in a <div> tag and text is raw inside of it. I pushed an experiment to rewrite that <div> to a <p> tag in the RSS feed. Hopefully this fixes it.

    Mangled posts in Feedly
Previous 320 of 724 Next