• After confirming that the <html> tag inside the <figure> tag was causing the errors with Feedly I went and fixed all posts. Below is the script I ran in the django shell.
    Happy to report that Tanzawa is once again producing valid rss.

    from bs4 import BeautifulSoup
    from post.models import TPost
    
    for t_post in TPost.objects.all():
        entry = t_post.ref_t_entry.first()
        soup = BeautifulSoup(entry.e_content, 'html.parser')
        for html in soup.find_all('html'):
            try:
                pic = html.find('picture').extract()
            except AttributeError:
                # no pic
                continue
            html.replace_with(pic)
        entry.e_content = str(soup)
        entry.save()

    Also being able to back up and restore your site's database with a simple "cp db.sqlite3 db.sqlite3.bak" is soooooooo nice.
  • 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. πŸŽ‚

Previous 335 of 739 Next