• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Digging the Digital

Vol Blogdrift!

  • /Now
  • Nieuw? Start hier
    • Blogroll
    • Tag Index
  • Startgids Mastodon
  • WordPress en Indieweb
    • WordPress en het indieweb
    • Hoe gebruik je IndieAuth met WordPress
    • WordPress en webmentions
    • WordPress en Micropub
    • WordPress en de Post Kind plugin
  • Notities
  • Bookmarks
  • Likes
You are here: Home / bloggen / An update to the Drummer to WordPress script

An update to the Drummer to WordPress script

14 November 2021 door Frank Meeuwsen 3 Comments

A few weeks ago I published a Drumkit script that lets you publish your post from Drummer to WordPress. It works fine, but I had one small bug I needed to fix and one nice-to-have for myself. I can say I fixed both!
First, in the original Drumkit script I have a few lines with HTML in it. When you have an (inline) image in your post, you want it to show properly on your WordPress blog. So I surrounded it with the basic tags for an image. Unfortunately Drummer, where the script lives, mangles this HTML every now and again. It tries to render the HTML when you open the script and it adds a few characters. It was all kind of weird. An to be honest, using HTML in a script like this never felt good to me.
So when I read about Dave’s plans to include Markdown support an idea hit me. My WordPress blog supports Markdown as well. So why not send the blogpost as Markdown and let WordPress figure it all out? So that’s what I did, especially with the images. Instead of using HTML in the script, I surround the image with the Markdown equivalent.
Since I don’t pay enough attention to filenames, they sometimes can have spaces in them. I had to replace these with %20 so my Markdown processor in WordPress will not choke on it. Thank you for multipleReplaceAll in the Drumkit scripting language.
The second thing I wanted is to add a link back from the WordPress post to my Oldschool blog. I had some great help from Dave and Amit to figure out how to build the URL to my post. This script from Amit was all I needed. It just worked. I added the script to mine, build a small link back to the original blogpost and I can publish it.
Here is my new script to publish from Drummer to WordPress, using Markdown and have a link back to the original!

Eerder gepost op mijn Oldschool Drummer blog

« Vandaag is Aaron Swartz Day
Untappd check-in: Rhodesian (4.5 ⭐) »

Opgeslagen onder: bloggen Tags: drummer, Script, WordPress

Reader Interactions

Likes

  • john

Mentions

  • Frank Meeuwsen
  • Aaron Davis

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Footer

Wat is dit?

Frank MeeuwsenDigging the Digital is de digital garden of commonplace book van Frank Meeuwsen. Onderwerpen variëren van indieweb tot nieuwsbrieven, bloggen, muziek en opvallende gebeurtenissen op het internet.

Meer Frank

Bloghelden - De definitieve geschiedenis van webloggend Nederland

Op deze dag

  • 2 years ago...
    • S02E27 – Cryptoscammers en Petje.af
  • 3 years ago...
    • ‪Wat mij betreft mag VPRO’s Mon...
  • 5 years ago...
    • Hoe abonneer je op een site?
  • 10 years ago...
    • Blogawards 2013 – Reflectie geeft meer inzicht en achtergrond.
  • 13 years ago...
    • Het einde van tastbare media?
  • 18 years ago...
    • Blogpet
    • Laatste dorp in USA nu ook telefoon
  • RSS
  • LinkedIn
  • GitHub
  • Mastodon
← An IndieWeb Webring →

Archives

  • Likes (264)
  • Bookmarks (258)
  • Notes (131)
  • Replies (53)
  • Articles (626)
  • All Posts

Digging the Digital staat op de state of the art server van Servebolt.
De snelste high-performance hosting met een sterke focus op schaalbaarheid en veiligheid.