Converting WordPress to Hugo

In short, frontmatter is a block of text at the top of text files that various static site generators read for metadata. Stuff like title, publish date and tags. But also anything you want, which you can then tell your generator to do something with.

As the exporter grabs meta fields from WordPress, converting to text revealed values for my posts that were not apparent from the UI. Here are some examples, with a variety of examples:

---
id: 786
title: White Light
date: 2007-11-02T02:06:46+00:00
layout: post
guid: http://cloud.interi.org/2007/11/02/white-light/
permalink: /2007/11/white-light/
categories:
  - journal
---
---
id: 55
title: 'A tough day…'
date: 2008-01-15T20:30:00+00:00
layout: post
guid: http://interi.org/2008/01/16/a-tough-day
permalink: /2008/01/a-tough-day/
categories:
  - journal
---
---
id: 4418
date: 2012-09-17T17:21:23+00:00
layout: post
guid: http://interi.solanin.net/?p=4418
permalink: /2012/09/4418/
categories:
  - journal
format: status
---
---
id: 6094
title: Violence in games
date: 2013-02-07T00:07:27+00:00
excerpt: Struggling with violence in games, and how I want to deal with it.
layout: post
guid: http://interi.org/?p=6094
permalink: /2013/02/violence-in-games/
categories:
  - Game Notes
  - journal
  - notes
---
---
id: 7532
date: 2015-06-07T08:41:35+00:00
layout: post
guid: http://interi.org/?p=7532
permalink: /2015/06/7532/
standard_seo_post_level_layout:
  - ""
standard_link_url_field:
  - ""
standard_seo_post_meta_description:
  - ""
categories:
  - journal
format: status
---
---
id: 7627
title: Discourse spam
date: 2016-06-07T10:06:11+00:00
author: maiki
excerpt: Discourse handles spam well, and follows through with all the actions one needs to block it.
layout: post
guid: https://interi.org/?p=7627
permalink: /2016/06/discourse-spam/
mf2_cite:
  - 'a:1:{s:6:"author";a:0:{}}'
prompt_no_email:
  - "1"
prompt_no_featured_image:
  - ""
prompt_excerpt_only:
  - ""
prompt_recipient_ids:
  - 'a:1:{i:0;i:2;}'
categories:
  - journal
---
---
id: 7837
date: 2017-01-09T03:50:31+00:00
author: maiki
layout: post
guid: https://interi.org/?p=7837
permalink: /2017/01/7837/
prompt_no_email:
  - "1"
prompt_no_featured_image:
  - ""
prompt_excerpt_only:
  - ""
prompt_recipient_ids:
  - 'a:2:{i:0;i:2;i:1;i:8;}'
categories:
  - Notable
---

The additional cruft in later posts is expected, because those are from plugins that I turned on for months or years at a time, but some of the older posts are from sites that I merged in, and I was surprised to still see the GUID showing their old URLs. With the REST API being promoted, I wonder what those will do to assumptions on rendering content in other ways; GUID is normally a strong value to key off, but for older sites like mine it won’t be.

And those were pulled over in the WordPress export file (WXR), so this isn’t a maiki-specific issue, like so many of my challenges in computing. :slight_smile: