Migration from Hugo to Ghost for www.eliora-tanzania.org

Migration of EliOra Tanzania, a Hugo project goes to Ghost.

Migration from Hugo to Ghost for www.eliora-tanzania.org
EliOra Tanzania

Eliora Tanzania is a project initiated by my girlfriend and a few other people. Since every project needs a website and a domain I am helping out there.

In the beginning, I did create a static site with Hugo, used the wowchemy theme, and did the hosting with GitHub Pages. This works great but I had a few reasons to switch:

  • Adding content is not easy for nontechnical folks. I can fully relate to that. I have moved my blog from Hugo to Ghost as well. Why? Because less friction leads to more blog posts for me personally.
    I can not imagine how hard it must be for my girlfriend to just write something. For markdown, you need to know how links work, and where to put images on the Hugo project. I even thought her a little bit of git, so that post will get published via a GitHub Action pipeline.
  • Despite having a static site, updating the wowchemy theme is kind of a pain. They are moving fast. I have to update and secure a Ghost instance already. So one more does not hurt much. And we are just sticking to the default Casper theme. Not much work on that side.
  • The membership function from Ghost could be a potential income for their donation system. (Need to play with that first.)
💡
You can also let your Ghost blog be hosted by Ghost itself. As you can see self-hosting is not easy. They will take care of hosting, mails, updating, backups, and more. Concentrate on content and let the support team help you out when in need.

You can signup here: https://ghost.org*

Setting up a test instance for content migration

First I just did set up a test instance for my girlfriend to migrate the content and explain to her how Ghost works. The visual editor makes things so much easier!

Do move was easy. The test instance was located at a test domain. After moving content I just had to change DNS entries and the Ghost URL in the docker container. A new Mailgun domain was also needed for mailing passwords but I think this counts as DNS as well.  

Setting up redirects

After the content was moved (wasn't that much) I checked the sitemap of the old page, and what redirects I have to set up. The site did not get much traffic, but I do not want to break links, which people might have shared.

With the Hugo setup blog posts were located at /blog/$postname, but with Ghost, I wanted to stick with the default behavior of /$postname.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<link type="text/css" rel="stylesheet" id="dark-mode-custom-link"/>
<link type="text/css" rel="stylesheet" id="dark-mode-general-link"/>
<style lang="en" type="text/css" id="dark-mode-custom-style"/>
<style lang="en" type="text/css" id="dark-mode-native-style"/>
<url>
<loc>https://www.eliora-tanzania.org/authors/</loc>
<lastmod>2021-03-08T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/britt/</loc>
<lastmod>2021-03-08T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/</loc>
<lastmod>2021-03-08T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/post/nielimishe/</loc>
<lastmod>2021-03-08T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/post/</loc>
<lastmod>2021-03-08T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/project/huruma-healthcare-center/</loc>
<lastmod>2021-02-28T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/project/</loc>
<lastmod>2021-02-28T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/carsten-graeske/</loc>
<lastmod>2021-02-16T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/post/asante/</loc>
<lastmod>2021-02-16T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/tags/demo/</loc>
<lastmod>2020-08-06T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/project/freilicht-museum-lindlar/</loc>
<lastmod>2020-08-06T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/project/maedcheninternat/</loc>
<lastmod>2020-08-06T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/tags/</loc>
<lastmod>2020-08-06T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/theresa/</loc>
<lastmod>2020-08-06T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/project/wildlife-project-nielimishe/</loc>
<lastmod>2020-08-06T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/constitution/</loc>
<lastmod>2020-06-25T00:00:00+01:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/projects/</loc>
<lastmod>2019-01-01T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/privacy/</loc>
<lastmod>2018-06-28T00:00:00+01:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/membership/</loc>
<lastmod>2018-06-28T00:00:00+01:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/terms/</loc>
<lastmod>2018-06-28T00:00:00+01:00</lastmod>
</url>
<url>
<loc>https://www.eliora-tanzania.org/admin/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/blog/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/contact/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/gallery/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/team/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/admin/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/caroline/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/categories/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/heri/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/marianne/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/publication_types/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/sabine/</loc>
</url>
<url>
<loc>https://www.eliora-tanzania.org/authors/wolfgang/</loc>
</url>
</urlset>
sitemap.xml from hugo site

Ghost has its own way of creating a redirect file which you then can simply upload via the admin interface. Here is the Ghost documentation about Implementing redirects in Ghost.

Here is my redirects.yaml:

---
301:
    /terms: /impressum
    /privacy: /datenschutz
    /membership: /mitgliedschaft
    /contact: /kontakt
    /post/asante: /ein-wort-genugt-asante/
    /post/nielimishe: /nielimishe-startet-durch
    /project/wildlife-project-nielimishe: /wildlife-project-nielimishe
    /project/freilicht-museum-lindlar: /kooperation-freilichtmuseum-lindlar
    /project/huruma-healthcare-center: /huruma-healthcare-center
    /project/maedcheninternat: /madchen-internat-secondary-school-mashati
    
redirects.yaml

You can upload this file under the Labs section at this moment. I did not create all redirects since not all of the content was moved.

That was basically it for this project right now.

If you want to know how to host your own Ghost instance I have a more detailed write-up on this in my post: Self Hosting a Ghost blog with docker-compose, Mailgun setup, and Stripe subscriptions

If you really do not want to bother with self-hosting Ghost you can also just use their service. You can sign up via my here

Take care!