Table of Contents
Textpattern
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—
Forms
Here're some forms I've made.
misc/media_audio_file
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.
<figure> <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> </figure>
Usage
<txp::media_audio_file file="" title="" artist="" />
Where file
is the name of the file, without it's extension.
misc/media_audio_bandcamp
Bandcamp embed with big cover-art.
<figure> <iframe class="embed-bandcamp" src="https://bandcamp.com/EmbeddedPlayer/track=<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> </figure>
misc/media_video_youtube
For adding Youtube embeds that are inside a <figure>
element.
<figure> <iframe class="embed-youtube" src="https://www.youtube-nocookie.com/embed/<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> </figure>
Usage
<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).
misc/text_nobreak
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
span.no-break { white-space:nowrap }
Usage
<txp::text_nobreak text="" />
Plug-ins
Plug-ins I'm using, or just curious about.
First part of plug-in name denotes author.
- smd_textile_bar - Adds a bar above the writing area so you can easily add bits of Textile markup. Can configure to use whatever snippets you want.
- etc_pagination - Better UI for finding pages.
Adding
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.
See Also
- https://plugins.textpattern.com/ - Official plug-in repo. Small.
- https://textpattern.org/plugins - Old plug-in repo. Much larger.
Theming
Haven't really dug in to this yet, but it's on my to-do list.
- rjt/textpattern-theme-musuc - Theme for my music blog.
Links
- drmonkeyninja/awesome-textpattern - lots of links.
See Also
- textile - Textpattern's markup language.