I’m a fan of Movable Type – the de facto blogging platform
…of the 2000s.
Movable Type is a static site generator by default, but since its fall, the web has moved on to much lighter static site generators. None of them is as elegant in design or templating to my admittedly nostalgia-tinged eyes. (I dare not consider the other side, with the PHP behemoth.)
It’s not just the web which has moved on, of course. The language Movable Type is written in, Perl 5, has changed too. Most notably, since version 5.14 or so, the language has started to evolve and break old syntax. It is because of this that Movable Type no longer runs correctly, or at all, with modern Perls.
That’s not to say Movable Type 4 won’t run today – it and even earlier versions will, but it takes a little work. We must either:
- edit the MT4 code (and potentially plugin code) to run under modern Perl
- run MT4 using an earlier version of Perl
There are problems with both approaches. Once you find the offending lines, editing the Movable Type code is not too difficult, provided you understand a bit of Perl. This was my approach at my former web host and it worked pretty well. There were still lingering problems, though – there were frequent warnings and image manipulation functions in MT didn’t work. I accepted the trade-offs as a temporary solution. Besides, that was my only option on shared hosting.
Once I moved this site to its own server, running an old Perl became feasible. But again, modernity brought problems. Understandably, any current and supported distribution of Linux is likely using Perl 5.26 or later. Though I may be comfortable running old software for myself, I will not run a publicly-accessible server on a so-called end of life operating system.
Then, CentOS 6. Distributions of CentOS are supported for a very long time and version 6 shipped with Perl 5.10. It was perfect for my needs but it too was a temporary solution. The operating system is only receiving the most critical updates at this point and all support will end in late 2020.
It is necessary to go another way: build and run your own Perl. This version must run parallel to the system’s Perl, and only for those applications which need it. Unless you’re a well-seasoned sysadmin, the process is a bit of an undertaking. It’s imperative to configure the building and installation of the Perl core, and its modules, so as not to disturb the system Perl.
Though it may take effort, and perhaps multiple attempts, it is possible to do on your own. It’s probably not advisable, though.
I am not the only person who has wanted to do this – perhaps even you might. Many people have the need and for that reason, the Perlbrew utility exists. It handles the messy details for you. This is the first step to getting a web app like Movable Type 4 running on modern systems.
Perlbrew is only part of the solution, but it’s probably the majority. You also need to get the web server to use the new old Perl and this takes some additional preparation and work. In a follow-up to this piece I intend to share the details of how I got it working on my machines. For anyone else out there who loves Movable Type and is slightly mad.
Making search match
The Near Past
Producing a ‘Recent Articles’ block with Movable Type
Armin Briegel, author of Scripting OS X, has been writing a series of articles on his transition from Bash to the Z Shell (
zsh). So far there are seven parts, touching on a number of things encountered in
- Configuration files
- Shell options
- Aliases and functions
- Prompt customisation
I’ve really been enjoying reading these articles. There’s at least one more big article to come, covering scripting with
I was always a
bash user because that’s what OS X shipped with. I had put some time in over the years customising aliases and functions, but never anything too deep. After all, I didn’t spend that much time in the Terminal.
About a year ago I started spending more time at the command line and changed my shell to the ‘modern’ shell called
fish. It comes with lots of nice in-built features like colourisation! Not just in syntax highlighting on the command line, but you don’t even need to specify a
-G flag to get colourised
ls output, for example. Holding down Option and pressing the left or right arrow key also does what I expect (as a Mac user), and jumps word-by-word.
Reading this had me wondering whether I should move to
zsh myself. Last weekend I spent some time setting it up, moving over aliases and customising my prompt. I’ve been using it since and in that limited time I’ve not found a lot compelling – but I’m also not using any plugins like oh-my-zsh. I agree with Mx Briegel on the matter. I’d rather configure it how I like without assistance, at least at first.
Both shells offer nicer scripting syntax. Here I agree with Dr Drang who wrote:
I think people who script in the shell—any shell—are masochists.
Most scripts I’ve got are simple enough that writing them in Perl instead might qualify as more masochistic. However, the script I wrote a couple weeks ago started simple and grew to the point where I was regretting it. I bumped up against bugs and incorrect or poor documentation of the
As a result the script is less robust and featured than I’d like, even if it’s only something I’ll use. My mistake. Naturally the bugs and documentation should be corrected, but I should have been using a better tool for the job.
For now I suspect I’ll stick with
fish. I can imagine a situation where I might use both:
zsh on Linux but
fish on my Mac. I will, however, continue to use
zsh for a while as I explore features and maybe try some plugins.
Rosemary Orchard and Scotty Jackson, two of my favourite people, have a new podcast, Nested Folders.
We’ll discuss all manner of productivity topics, mostly centres around philosophies, techniques, and approaches, so that listeners can benefit from our experiences, regardless of apps or systems they might use.
Also, a huge thanks and shout out to Josh Hughes for the amazing cover art. Love this!
Josh also designed the cover for Build Your OmniFocus Workflow, my and Rose’s book. (Oh, and some fantastic OmniFocus icons, too!)
The EFF are working to protect people’s rights online. They also produce and support Certbot. It automates the process of installing Let’s Encrypt SSL certificates on a web server.
A donation of any amount is welcome, I have no doubt. From US $20, you can get a gift in exchange for a donation. For the next two weeks you can get a set of four pins depicting the EFF logo and four symbols representing advised actions and habits:
- Locks: use two-factor authentication
- Keys: use an encrypted messaging app
- Die: use a password manager
Even if you don’t plan to donate or have no interest in the pins they’re still all good ideas.
Richard Berry, an academic in the field of radio and podcasting asks and answers:
When is a podcast not a podcast? When it’s a paycast.
No argument from me.
Lee John Phillips is cataloguing and illustrating every item in his late grandfather’s tool shed. The objects are mostly incredibly mundane – screws, washers, pliers – but his delicate drawings make them incredibly interesting. You can see some of them on his site, but also in various interviews and profiles around the web.
His site says that he anticipates the project will take five years to complete. Six years after starting it, he has amended that projection suggesting it is his ‘life’s work’ sketching the estimated 100,000 items.
What an wonderful way to honour someone’s memory.
See Also: A short video interview with Mr Phillips produced by BBC Wales.
This is an interactive map of the world’s lighthouses showing their flashing pattern and colours. I don’t know why, but I find it difficult to pull myself away from it.
Of note on the map is Europe, which plainly loves lighthouses, lighting up its coastlines like a Christmas tree. Norway’s coasts, though, are remarkable – not just for the fjords. Its Antarctic and Atlantic coasts are thick with lighthouses of every colour. Beautiful.
(Via The Morning News.)
It is possible to customise DuckDuckGo for yourself using the settings page. Customisations include changing the site’s colours and fonts, but also behaviour, like infinite scrolling and whether the header appears.
Of particular interest to me is that these settings can be modified using query strings. Thus, when you use the search form, the search results page at DuckDuckGo uses colours from my site.
The colour values and other customisations are fed to DuckDuckGo via hidden fields in the search form. For example:
<input type="hidden" name="kj" value="#41072A"><!-- header--> <input type="hidden" name="k8" value="#333333"><!-- text --> <input type="hidden" name="k9" value="#C00076"><!-- links --> <input type="hidden" name="kx" value="#B4B4B4"><!-- url -->
The work of getting the search from here to DuckDuckGo is handled by redirect rules in my web server configuration. In part because of how I’ve set that up, searching using the
query syntax isn’t customised. It should be possible to make it work, but not really worth the effort.
Applying for a job is hard. Every time you don’t hear back, you can lose a tiny little something of yourself. You thus might try just that little bit less next time. So if you keep applying for unlikely-to-get jobs, you might eventually water yourself down, and dilute your application, until it’s a very thin cup of tea indeed.
Don’t do that. Apply when you have a real shot. Stretch a little, but not too much. Save yourself and your ego from the lottery trap.
Great advice, here and in the entire article. As someone who is embarking on a job search, it was encouraging to read this.
From the moment Steve Jobs announced it in 2007, anticipation for the first iPhone was off the charts. And when it shipped? … if you had a disability, the new hotness was just a cold, unresponsive rectangle of plastic and glass.
This is the story of how that changed in June of 2009, and what it has meant to people who are blind, have a hearing disability, or experience motor delays.
Apple’s dedication to accessibility on their platforms wasn’t always a given as this programme clearly shows.
This was a great documentary. It reminds me of a one-off or maybe a short series of programmes that might be broadcast on traditional radio. Podcasting is great, but I still adore the simplicity of just tuning in. You never knew what you’d hear.
If I had my druthers, everyone would write a blog like mine, and we’d have great tools for reading them in a myriad of different ways to please everyone. Innovation, independence, customization, variety and decentralization. Wonderful.
There’s something wonderfully human about this that I love.
Fyyd, a German podcast directory, offers a powerful search engine powered by traditional keywords and operators. Perhaps less useful, but more interesting is this tool for searching by the colour of a podcast’s cover artwork.
You can reload the page to get a new randomly-selected colour. My most recent was for
#AD9023, a golden orange-yellow colour, which led me to an amusingly-named podcast called ‘Timber’.
Several weeks ago I added a ‘Recent Articles’ box to the site. At times I may go a couple of weeks between writing these more focused, ostensibly interesting, pieces of writing. It depends mostly on my free time, but also motivation.
Writing these pieces takes several hours, often across multiple days. If I were to set aside the self-deprecation for a moment, I might even say I like these articles and maybe even be proud of them. (I had better stop before I pass out.)
The consequence of these feelings it that I want them to be noticeable and not get buried under the slightly more frivolous link posts. Thus the ‘Recently’ block was born to highlight some of my recent entries. I decided to put it on two pages: the most recent link entry page and ‘below the fold’ of the home page.
Note: The templates discussed below are only the relevant excerpts and the indentation may a bit wonky, at least for my tastes. Links are provided to view the full templates. Alternatively you can download them all at once.
Generating the content block
The most integral part to this is generating the HTML that builds the block. Because it’s used in two places, I saved it as a template module that saves the generated content in a variable called
recentlyContent. The items it generates differs slightly depending on where I want the block to go.
If the Recent block is appearing on a link page, then I want the last three articles displayed, no matter when they were posted. When it’s being placed on the home page, there’s a bit more nuance. If the latest article is one of the three most recent posts to the site, I don’t want it to appear in the block.
Plugin Note: This requires the MultiBlog plugin which allows the system to pull data from multiple blogs at once. I call it using the
blog_ids attribute. In my case, blog 1 is articles and blog 2 is for linked posts.
<mt:Unless> block handles this logic. The value for the variable
on_link_page is specified in another template we’ll see later. If it is unset,
<mt:Entries> gets three posts and loops through them testing whether any entries are from blog 1. If one is found, it sets an offset variable which will be used later in this template.
<mt:SetVarBlock name="recentlyContent"> <mt:Unless name="on_link_page"> <mt:Entries blog_ids="1,2" lastn="3"> <mt:If tag="EntryBlogID" eq="1"> <mt:Var name="articleOffset" value="1"> </mt:If> </mt:Entries> </mt:Unless>
The second block of code, in an
<mt:If>, gives the Recently block a header and opens the
<div>. It handles a special case for setting margins when the block is on a link page, again evaluating the
<mt:If name="on_link_page"> <h2 id="recently-head" class="on-link-page">Recent Articles</h2> <div id="recently" class="on-link-page"> <mt:Else> <h2 id="recently-head">Recent Articles</h2> <div id="recently"> </mt:If>
The final block does the work of putting the article titles and subtitles into HTML. The
articleOffset variable appears here as the
<mt:Entries> requests the last three articles starting from
0, unless the offset was set to
1 in the initial logic.
<mt:Entries blog_ids="1" lastn="3" offset="$articleOffset"> <a href="<mt:EntryPermalink replace='.html',''>" title="Read ‘<mt:EntryTitle>’"> <p class="recently-title"><mt:EntryTitle widont='1'></p> <p class="recently-subtitle"><mt:EntryExcerpt widont='1'></p> </a> </mt:Entries> </div> </mt:SetVarBlock>
Permalinks have their file extension removed (for clean URLs) and the titles are processed by the Widon’t plugin. The finished
<div> is saved in the aforementioned
recentlyContent variable to be output in the template which calls/includes the module.
‘Recently’ on the home page
The Recently block is put onto a page in two steps. First, the HTML is generated and placed into the
recentlyContent variable as detailed above. This process is called by using the
<mt:Include module="Variable – Recently">
The template continues by opening up the
<main> content block and entering the primary
<mt:Entries> loop, calling additional modules to display articles and links.
<main class="page-content"> <mt:Entries blog_ids="1,2" lastn="23"> <mt:If tag="EntryBlogID" eq="2"> <mt:Include module="Entry Body – Link"> <mt:Else> <mt:Include module="Entry Body – Article"> </mt:If>
The second step in the process is simply outputting the contents of the variable. For me, choosing where is a bit complicated. On the home page I prefer for the block to appear ‘below the fold’. Which is to say that I want it to appear slightly or completely below the initial viewable area; you have to scroll to see it.
To accomplish this is an inexact science only using HTML and CSS. I concluded that using a basic word count would suffice. If the first item listed is fewer than 110 words, then Recently will be ‘delayed’ and placed after the second.
To get this, I check if the current entry is the first using the
__first__ meta variable. If it is, I use the
setvar tag modifier (a shortcut for
count_words, which unsurprisingly counts the number of words returned from a tag.
<mt:If __first__> <mt:EntryBody count_words="1" setvar="firstEntryWordCount">
<mt:If> evaluates the word count and if there are more than 110 words, it gets the content saved in
recentlyContent – done and dusted. Otherwise it sets a variable indicating that Recently should be delayed until after the first entry. The loop then continues to the next entry.
<mt:If var="firstEntryWordCount" gt="110"> <mt:GetVar name="recentlyContent"> <mt:Else> <mt:SetVar name="delayRecently" value="1"> </mt:If>
As the next entry is displayed, it’s no longer
__first__, causing the following to be evaluated. If
1 (true), then
recentlyContent will be output. This would be true for all following posts, so the final piece is to set the delay variable to
0 (false), ensuring the block is not displayed again.
<mt:ElseIf var="delayRecently" eq="1"> <mt:GetVar name="recentlyContent"> <mt:SetVar name="delayRecently" value="0"> </mt:If> </mt:Entries> </main>
Once the 23 entries have been evaluated, the main content block is complete.
‘Recently’ on link pages
Compared to the logic used on the home page, link pages are quite simple. I only need to place the block on the most recent entry. These link pages are produced as an ‘individual archive’ in Movable Type parlance. The biggest difference is that the pages aren’t produced in the
<mt:Entries> loop, so we can’t use the
__first__ variable. Each entry is effectively both first and last as it’s being written by the system.
Instead we can use a slightly roundabout way to evaluate if this is the latest entry by using the
<mt:EntryNext> tag. If a next entry doesn’t exist, then include the Recently template and pass the
on_link_page variable. (
blog_id specifies which blog the template belongs to and is necessary since the Link template is in blog 2.) Finally, display the content generated by the variable.
<mt:Unless tag="EntryNext"> <mt:Include module="Variable – Recently" blog_id="1" on_link_page="1"> <mt:GetVar name="recentlyContent"> </mt:Unless>
That’s all that’s required.
Taking ‘Recently’ off old link pages
Though it is possible for Movable Type to generate dynamic pages, I still prefer to keep plain, static, HTML pages. Every time I publish a new item its file is created by Movable Type.
Following that logic, every Link page would end up with the Recently block on it. When the page was generated, it didn’t have a next entry. The block would also be stale. But it’s not.
Working around this would be convoluted, but fortunately we can lean on Movable Type’s behaviour to correct the issue. The link pages include navigation links to next and previous entries. When a new entry is created, the previous needs to be updated to add a link to it, regenerating the page. This means our
<mt:Unless> block is re-evaluated and Recently is not displayed. Very convenient.
Steven Aquino on Twitter:
One cool tidbit about Voice Control: It uses the TrueDepth camera on iOS/iPadOS to tell if you’re looking at the computer. If someone walks over and you turn your head, Voice Control will stop listening until you go back to your computer.
I think Voice Control is the thing I got most excited about watching the WWDC 2019 presentation a couple weeks ago. I am able to use my Mac without such features, but it looks so cool that I can’t help but want to use it.
Mr Aquino’s point helps illustrate that a lot of work – and thought – went into making the feature. So much so that calling it a ‘feature’ almost trivialises it.
I’m still very excited to play this game (again). It may be fun to explore the new features, like custom player-made dungeons, but I can be satisfied with the main adventure. I love that even inconsequential things, like the placement of enemies is the same. So much of this game is permanently etched into my brain.
I’m less excited by the art style, though. The glossy three-dimensional is fine, but the human characters’ faces are uncomfortable to look at. I don’t like the pointy featureless noses or the empty black eyes. I am probably in the minority. It won’t stop me playing the game, certainly.
I can’t wait to hear more of the music. We hear The Ballad of the Wind Fish as the trailer closes. The song was always moving, but hearing it in full instrumentation, it’s heartbreaking.
Last week The Divine Comedy, the band made up of Neil Hannon and company, released a new album entitled ‘Office Politics’. I compliment it to say that it is a completely typical example of a Divine Comedy album.
It seems that Hannon has sold his soul for the ability to create endless perfect earworms. I curse him when one of his tunes floats back into my head. (But only a little.)
The two songs that are most often popping up for me are the single, ‘Norman and Norma’ and ‘Philip and Steve’s Furniture Removal Company’. The lyrics of the latter are just those six words, repeated. The notes the words are sung to, though, are infectious.
I can’t stop listening to it, both by choice and by having it foisted upon me by my brain. If you listen, do so with my warning. And approval.
Hide the tampon in a pamphlet about women’s reproductive rights. Menfolk can’t stand any mention of women’s reproductive rights.
The other day it was Dave Winer, now today Brent Simmons writes about his blogging set up – how he writes and runs Inessential, as well as his microblogging and reading processes.
In a follow-up, he talks more about ‘short stuff’ and intensifies my interest in maintaining something that’s more like a traditional ‘blog’.
[This video] makes me realize the real reason I am blogging on Rocket Panda instead of something like SquareSpace or Tumblr. … The reason is because it’s my platform. I own every pixel of this website and I can control what goes on here and what doesn't.
Well said. Recognising and acknowledging this feeling can be a source of motivation for ourselves and others. I tend my front garden to have flowers that please me – and maybe others – but no one can dictate what is planted there.
Getting your own space online is feasible for anyone. If you have questions or need advice, ask friends or the authors of sites you admire. The internet is, ultimately, a friendly place and new voices are always welcome.
I have recently become interested in the IndieWeb effort. The belief that we should own our content and be in control of it resonates with me.
I can’t yet bring myself to mar my HTML with microformat declarations. For no good reason, I did add my site to the IndieWeb web ring, though.
The project was created by Marty McGuire during the IndieWeb Summit in 2018. The web ring concept is charming and feels like the internet of the 90s. That retro feeling is quickly balanced by a domain made of emoji characters. It’s almost painfully modern, being impractical to type.
Each site in the web ring directory is given an randomly-generated emoji identifier. I can’t help thinking that mine, ➕😞📭, with the prominent ‘disappointed face’ emoji, is appropriate.
Links to the next and previous sites from mine in the web ring are available in the page footer.
Japan plans to make it mandatory to charge for plastic shopping bags at supermarkets, convenience stores, drugstores and department stores as the country combats marine pollution by plastic waste.
Though this is only a small part of Japan’s plastic problem, I can’t believe I will live to see this day.
The price charged for a bag will be set by the shop. I expect that the price they charge, at convenience stores in particular, will be very inexpensive. Nonetheless, because the customer needs to be asked, perhaps they’ll consider taking their items without one.
I’ve never been to a supermarket where plastic bags were free, but the prices are typically 3 yen for a smaller bag, and 5 yen for a large one. They’re very cheap, but I almost never see them bought – most everyone has an ‘eco’ bag for life.
(I used to live near a shop which sold the city’s required bin bags as their ‘I forgot my eco bag’ alternative, which I thought was brilliant.)
Apple have revived the New York typeface, last seen in the pre-OS X days. Unlike the San Francisco face, which was wholly new, new New York is an update of the old version, and it looks great. It even comes in four optical sizes, so the type should look beautiful no matter how large or small it’s displayed.
It’s a pleasure to see ‘New York’ back in my fonts menu. I’m excited for its potential to improve the typography of web sites, much as San Francisco has done.
(Thanks to Rose for the tip-off.)
Dave Winer writes about how his homemade blog software, Old School, works. He’s an outliner guy and it’s based on outlines. It suits him and his style perfectly.
What I admire about Winer’s writing is that it’s simple. Partly because he’s thinking in outlines, some posts may only be a sentence. It’s like his ‘traditional’ blog and a micro blog rolled into one. I like this style a lot.
That is why for a couple weeks I’ve been playing with doing something similar myself. Some of the items I’ve written I wouldn’t mind having on the site front page. Others are more like journal posts: abysmally boring, even for the author. I need to figure out what I want it to be and where, or if, I want it to appear.