
Migration to Ghost
technique · Article · mardi, 22 septembre 2015 à 12:26:35 · 8 min
Here we are at last: hesitation has given way to determination, and it is with pride, dear Net Citizen, that I have finally dumped WordPress for Ghost. This post roughly summarizes the broad strokes of the changes made and to come.
But what is happening? What is going on?
Press and grievances
As I hinted back in April in a quick post on my old blog, WordPress has been disappointing me for a while now: Automattic Inc., the corporation behind this CMS, made the regrettable decision to cripple some of its baby's features by migrating them to its JetPack plugin, whose initial purpose was simply to connect self-hosted blogs to WordPress.com's servers. I liked that idea: between centralization and decentralization, the point was to take the best of both worlds.
Unfortunately, to entice users to opt for JetPack, Automattic chose to arbitrarily restrict certain features to its plugin, when they could easily have been integrated into the core CMS (widget visibility, carousels, ...). Add to that an "improvable" codebase (kof kof), which condemned WordPress blogs to being nothing but Rube Goldberg machines, and you will understand the need to take my business elsewhere. That is now done.
At the end of the tunnel, the ghost
Ghost is a blogging platform that is making more and more noise. To stand out from WordPress, it is built on a modern, standard technical base (NodeJS, Handlebars), limits itself to producing text (do not hope to use it for your online store) and consequently aims to be much speedier than its competitor.
After a few difficult first attempts (finding a local host that accepts NodeJS is no sinecure), I believe I have found a host more or less able to serve Ghost in a fairly stable manner. However, as I write these lines, the situation is still far from perfect, hence the use of an alternative address and the fact that my previous blog is still online.
Ienpw the progressive, Anubisarchives the conservative
This is how things will work from now on: the address ienpw.ch will point to the development versions of my projects / programs, and anubisarchives.com will redirect to the stable versions. It will take a few more months before this Ghost version is truly functional.
The new blog
Thus, Ghost aims to be particularly minimalist. Gone, the pages for every Media file you upload. Forgotten, the post categories. To the fire, the thousand half-finished plugins! For the whole infrastructure, Ghost offers a Markdown message editor, a dozen options for the blog's configuration, a few "labs" features and a rather expeditive management of the authors' profiles.
||MarkDown is nice, but it remains limited. To reintroduce certain features developed for WordPress, I added a Javascript parser to my theme. For instance, the lines you are presently reading are dynamically added in the margin.
This CMS is therefore aimed at two kinds of people:
- Those who simply want to blog
- Those who enjoy developing themes and applications without being burdened by WordPress's constraints
How convenient. I belong to both categories.
The new theme
The new theme has three principles: (1) be more airy than the old one, (2) not get bogged down with backward compatibility with old wheezing browsers and (3) offer more consistent navigation.
The first principle is subjective, but I tried to achieve it by reducing the dark colors and using a thinner typeface. My wife and I are not entirely satisfied with the round shapes in the site's header, so they are likely to change into something very different soon. The colors, on the other hand, speak to me much more: they are likely to stay in place.
Obsolete browsers risk suffering when passing through my blog: expect a few (serious) surprises if you use a browser about six months old. For the technical details of some potentially problematic points:
- the use of
display: flexmakes it possible to display three columns of different sizes (the central one having a fixed size, the other two not) without resorting to disgusting hacks or Javascript. - the dynamic drop shadow on the header shows the progress of vertical scrolling (some browsers no longer bothering with this detail). To respect the transparency of the PNG file serving as background, it was necessary to use a CSS filter effect that does not even work on all browsers. At worst, you will simply not see it. Its movement is powered by KnockoutJS.
- Certain CSS pseudo-classes are used to select specific elements of the DOM. Thus, the "arrow-box" layout I use on my image-related articles is achieved in a much simpler way than before. Unfortunately, the implementation of pseudo-classes varies greatly depending on browsers and their versions.
- the JS parsing of the code is dynamic. It relies on KnockoutJS and jQuery, so it should work with all reasonably respectable browsers, but one is never safe from a bad surprise.
Finally, the navigation has been considerably simplified: my blog consists of a "playful" part aimed at RPG players and gamers, an "artistic" part for wannabe illustrators and a technical part generally interested in web technologies. The links to my other sites have been (temporarily) removed from the blog's pages.
Unsurprisingly, I also took the opportunity to perfect the Piwik tracking code. In bulk, here are the new features:
- If the blog's tab is not active, the time spent reading the article is not taken into account. This is a partial solution to the problem of visitors opening many tabs and visiting them one after the other, possibly over several hours.
- The custom variables were only partially functional, due to a poor understanding of Piwik's inner workings. The problem is now fixed!
- Once the reading is over, a rudimentary form comes to inquire about the readers' satisfaction. Indeed: thanks to Piwik, I was able to observe an impressive drop in the bounce rate since the previous theme was introduced on WordPress (August 2014), but this progress did not allow me to get qualitative feedback on my articles. This is now done: when you scroll to the bottom of an article after a certain reading time (indicated in each article's header), a small floating window appears at the bottom of the page, with one random question out of three (they concern the quality of the writing, the approval and the usefulness of the article). Eventually, I will be able to distinguish the appreciated articles (read + appreciated), the uninteresting articles (not read and useless) and the polemical articles (read + not appreciated).
ToDo List
There is still plenty of work before this blog is truly in production. I am moreover open to suggestions, should you have advice for improving it (while waiting for the implementation of comments, you can reply to me on Twitter).
Comments: Ghost does not offer a comment system and never will. Failing that, the designers suggest using Disqus, but this site joins the list of far too many ultra-centralized cloisters of the web where users are dissected, analyzed and auctioned off (sorry: not the "users", but simply all the data they can drop without realizing it). It is possible to link Ghost to NodeBB, a more modern phpBB2-style forum. I had a rather conclusive first experience, but the server struggled to keep the forum online. To be tried again soon! UPDATE: The comments work. As before, they are linked to a NodeBB forum.Server stability: even more problematic than the absence of comments, the blog's responsiveness is worrying. Sometimes ultra-speedy, it tends to doze off, or even throw 504 errors without me understanding why. UPDATE: after removing all the parasitic processes on my current hosting, the blog already runs better. However, it still tends to doze off a little, and I think all the OTS's sites will move to a provider like DitigalOcean or CloudSigma.- Graphic theme: the graphic theme requires a lot of retouching, starting with a responsive version worthy of the name, then a system to load thumbnail images rather than shrunk wide versions (Ghost does not handle this aspect either, and it is far more problematic than the rest). The Meta tags for SEO and the compression of source files will also have to be considered, so as not to lose good ideas present on WordPress. Obviously, the Google fonts - currently used until a suitable one is found - will kindly be "shown the way out of the blog" as soon as possible.
- Article migration: you have no doubt noticed it, the migration of my old blog's articles is far from over. I will try to bring over 3-4 per day.
Every year, the Archives d'Anubis receive some love. This time, it is not merely cosmetic, but truly a deep change. As the Web was not built in a day, it will take more time before everything works perfectly. Target for a final version: horizon 2016.
Sutay tunedulu