User Tools

Site Tools




I've mostly used Wordpress for self-hosted blogging (and tumblr for not-self-hosted), but, out of curiousity, decided to give another platform a shot when reviving my m~u~s~u~c blog that I lost in the great whoops of 2019.

Textpattern has a bit more of a DIY-feel that Wordpress, not just in that it feels less slick and corporate, but that it feels easier to hack at it! A thing I'm really starting to appreciate is the ability to add forms, which are just chunks of HTML you can insert where you want, including passing in whatever attributes you setup.

Browsing their Github issue tracker probably was the deciding factor in trying this particular CMS, because they had recently moved to stop including any third-party links. So nothing to block in my ad-blocker :3 No JQuery, no Google/AJAX, no FontAwesome—


Here're some forms I've made.


For adding audio file embeds that are inside a <figure> element. Should be expanding for not-ogg, but whatever).

A bunch of this is specific to my blog, but a bunch is also generally useful I think! Used very similar forms for a bunch of media. The size is set in the theme's stylesheet.

	<audio src="files/<txp:yield name="file" />.ogg" type="audio/ogg" controls></audio>
	<figcaption><cite><txp:yield name="title" /></cite> <span class="title-artist-separator"></span> <span class="artist"><txp:yield name="artist" /></span></figcaption>


<txp::media_audio_file file=“” title=“” artist=“” />

Where file is the name of the file, without it's extension.


Bandcamp embed with big coverart.

	<iframe class="embed-bandcamp" src="<txp:yield name="track" />/size=large/minimal=true/" seamless></iframe>
	<figcaption><cite><txp:yield name="title" /></cite> <span class="title-artist-separator"></span> <span class="artist"><txp:yield name="artist" /></span></figcaption>


For adding Youtube embeds that are inside a <figure> element.

	<iframe class="embed-youtube" src="<txp:if_yield name="vid"><txp:yield name="vid" /></txp:if_yield><txp:if_yield name="plid">videoseries?list=<txp:yield name="plid" /></txp:if_yield>"></iframe>
	<figcaption><cite><txp:yield name="title" /></cite> <span class="title-artist-separator">~</span> <span class="artist"><txp:yield name="artist" /></span></figcaption>


<txp::media_video_youtube [vid=“” | plid=“”] title=“” artist=“” />

Where you use either vid to specify the ID of the video, or plid to specify the ID of the playlist (including the PL letters at the start).


Just wraps a <span> round some text so you can tell it to not get broken over a new line.

<span class="no-break"><txp:yield name="text" /></span>

You'll also need to add some CSS to make it work { white-space:nowrap }


<txp::text_nobreak text=“” />


Plug-ins I'm using, or just curious about.

  • drmonkeyninja/arc_youtube - Youtube embeds.
    I ended up wanting my videos included within the <figure> element, so I've my own in form form ;3 (see above)
  • smd_tags - Textpattern has a weird two-category-per-post limitation, but this (and some other) plugins are a good workround. This was easier to setup that tru_tags, so I've stuck with it.


An interesting thing about Textpattern plug-ins is that to install them you just copy a bunch of plain text into a field in the GUI.


Haven't really dug in to this yet, but it's on my to-do list.

See Also

  • textile - Textpattern's markup language.
tool/software/textpattern.txt · Last modified: 2020/05/12 09:27 by rjt