What is the best way to import an existing Hugo site, using a slightly modified version of the Hyde theme, to micro.blog?
Should I be cloning the Hyde theme from GitHub (GitHub - spf13/hyde: Port of Mdo's excellent theme to Hugo) and integrating my modifications, or can import my existing Hugo directory wholesale, which also includes the associated content? I’ve also tried importing z .zip of the the content directory containing my .md files and nothing seemed to happen.
Import just the content files by uploading them to Posts → … → Import and select the Markdown option. The Micro.blog importer is picky about the front matter (most notably tags/categories have to all on one line) so if you run into problems, let us know.
Check if the posts look good under Posts. Also check the import log at Account → View logs.
Install the Hyde theme under Plug-ins.
Then create a custom theme that has just the edits you want to make to the theme and copy those templates in. Separating your edits will make it easier to manage later, but isn’t required. Micro.blog merges the layouts from all themes and plug-ins together.
I can explain in more detail if anything is confusing.
Thanks Manton. I tried uploading my blogs subdirectory and got this in the logs: “Import: Invalid date”. The date is formatted like so:
date = "2016-10-31"
The TOML in my front matter is pretty vanilla. tags and categories are not multi-line. I’m not sure why it’s picking this file in particular to error on. Maybe it just happens to be the first file it’s trying import or maybe there’s something different but if there’s something different, it is very much not obvious what that is.
I’m sorry, but I’m not finding what separator to use for tags on a single line in YAML? Also perhaps the “hugo convert toYAML” may not have fixed dates properly… it looks like perhaps dates should be unquoted in YYYY-MM-DD format?
That date format should be fine. For multiple tags on one line, Micro.blog will accept a comma-separated list. For example, I know some blogging systems output something like:
categories: [ "Category 1", "Category 2" ]
Sorry for the trouble! There’s room for improvement here on the Micro.blog side so that it’s more flexible.
Manton, thank you. That seems to have worked and I’ve now successfully imported the blog post directory without errors but only a small fraction of the .md files have actually imported. I see no indication in the log as to why the majority of the files were skipped. Could you please advise how additional debugging information can be obtained? Thank you.