WordPress to Hugo, Netlify, and Forestry, part Deux

OK, so now that the initial transition is over, what are the next set of Gotchas that I encountered. Some a deep and others are silly, but all are useful at least for me:

Mount issues

One of the cool things about the way that latest Hugo Modules works is that it allows virtual mounting so that you can have a theme, there is a virtual mount and it can be overridden as needed. For instance the Themefisher Parsa theme has a line that looks like in config.yaml (can I also mention at this point that YAML makes way more sense in this case than TOML because there is a hierarchy.

modules:
  imports:
  - path: github.com/themefisher/parsa-hugo
    mounts:
      - source: static
        target: static
      - source: exampleSite/static/images
        target: static/images

What what this means is go to the repo on GitHub.com and for the directory static there, take that and add the contents to the ./static in your site. It is a great way to add lots of themes and mix in parts. The second part is even more clever, it says take the images from the example website there and put it in.

The problem is that static is not a default mount, as you can see by running hugo config mounts and you can see static is not there, so you need to add these lines. But unintuitives, the first source/target pair isn’t enough, if you don’t add the second, you don’t get the union of all files in your repo and the theme repo. I sent them a bug

modules:
  mounts:
    - source: static
      target: static
    - source: static/images
      target: static/images

Being in the wrong Netlify account

Netlify is pretty awesome, you get a free 100GB of build when you have a small site. But I made a mistake, in that one of these sites is actually for a non-profit, so I wanted to transfer that to a different account. turns out this is pretty hard. You can move it to a new team, but that costs $15/month/user.

The easiest way to stay free is not much fun but it does work. The main confusing is that there are actually two domain entries in Netlify. The first is at the site level which tells the system what domain is used for that site. The second is Netlify Domain DNS which is the actual DNS service. You have to deleted the entries for both and recreate it.

  1. Assuming you don’t want to wipe out the old account, the steps are to remove the settings from the Domain settings and then go to the Site and remove the Domain link. There are two parts to this in that the Netlify Domain DNS removal does *not* mean that the Site connection is broken, so do both.
  2. Recreate the site on the new account. Go to Site Settings >> Domain and add the new domain. Note that most likely you will have to change the Registrar link as there are quite a few different domain servers with Netlify.
  3. Then make sure to add MX records (so the mail still works) and then you are back to Site Settings
  4. Make sure that HTTPS is on by the way in the site settings and you are done!
  5. Finally, this can take a little while. It took about 30 seconds for the new owner login to realize I had deleted the Domain settings.

You can also email them, but who wants to email when you can spent 15 minutes deleting and entering new stuff.

Note that when you do this move, you can still edit from Forestry with your old account and also in GitHub, this just affects the publishing which is nice. And you get a fresh free quota there.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect

Recent posts

Loading Mastodon feed…