• Spring naar de hoofdnavigatie
  • Door naar de hoofd inhoud
  • Spring naar de voettekst

Digging the Digital

Vol Blogdrift!

  • /Now
  • Nieuw? Start hier
    • Blogroll
    • Tag Index
  • 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
    • Notities
    • Likes
    • Bookmarks
  • Over nieuwsbrieven
    • Alle edities van mijn OPEN nieuwsbrief
    • 10 soorten nieuwsbrieven
    • 8 nieuwsbrief directories
    • Podcast met Elger van der Wel over nieuwsbrieven
    • Nieuwsbrief-automatisering
    • Ontmoet je nieuwsbrief lezers in een virtuele wereld
Je bent hier: Home / bloggen / [Article] An update to the Drummer to WordPress script

An update to the Drummer to WordPress script

14 november 2021 door Frank Meeuwsen 3 Reacties

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

Lees Interacties

Vind-ik-leuks

  • john

Vermeldingen

  • Frank Meeuwsen
  • Aaron Davis

Geef een antwoord Reactie annuleren

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

Deze site gebruikt Akismet om spam te verminderen. Bekijk hoe je reactie-gegevens worden verwerkt.

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

Thanks for Subscribing - Een overzicht van de beste en mooiste nieuwsbrieven.

Bloghelden - De definitieve geschiedenis van webloggend Nederland

Op deze dag

  • 1 jaar ago...
    • Dinsdagochtend wandeling
  • 3 jaren ago...
    • Bookmark: Metropolis (1927) De-Oldified
  • 9 jaren ago...
    • De Incredible Leesmap #21
  • 17 jaren ago...
    • De mop is dood
  • 19 jaren ago...
    • R.I.P. Bradley Nowell
  • 20 jaren ago...
    • Frankly
    • Vorig jaar op Breda Barst…
  • RSS
  • LinkedIn
  • Twitter
  • GitHub
  • Mastodon
← An IndieWeb Webring →

Archieven

  • Likes (240)
  • Bookmarks (222)
  • Notes (103)
  • Replies (47)
  • Articles (552)
  • 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.