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.
@manton Can you provide an example of a file, with the proper YAML front matter, that would import properly? I downloaded my blog, took a simple post, put it in a .md file with slight tweaks, put it back in a .zip file, uploaded, and got “date error” on import.
Thanks.
—George Jones (contemplating importing my Hugo blog)
I’m trying again to transition the content and style/formatting currently located at my Hugo site to Micro.blog.
However, I couldn’t figure out how to make a “landing/home” page and I had trouble figuring out fonts and linebreaks.
The Hyde theme I’m using is very lightly customized, although I’ve spent hours trying to get it to look the same on micro.blog and just can’t get it working.
Is there a straightforward path forward to figure all this out, or am I trying things that aren’t made to work easily on micro.blog?
It works identically to Hugo. You can drop in your Hugo theme as is and add just a few components and be done. Can you be more specific what’s giving you trouble with fonts and linebreaks? That’s entirely done in CSS.
As for a landing/home page-- you’d have to create a new layouts/index.html template and move the current layout/index.html to a different page than /index.html and link to it on your site.
Also, Micro.blog supports Hyde, so you could just start here and diff with your current blog and bring in the parts you want from your current system: