Markdown import

Importing a folder of Markdown files.

In addition to importing from WordPress, Medium, and other blogging platforms, you can upload a ZIP file containing multiple Markdown files to your Micro.blog-hosted blog. Click Posts → Import.

Micro.blog supports several frontmatter fields:

  • title
  • date
  • categories
  • tags
  • draft (true or false)

While Micro.blog mostly ignores the file structure in the ZIP file, it will notice if some of your Markdown files are in a folder called “drafts” and make those drafts in Micro.blog.

The ZIP file cannot be larger than 45 MB.

Photos

Do not include any photos in the ZIP file. Micro.blog will look for img tags (or Markdown image references) and attempt to download those images to store with your Micro.blog-hosted blog. Make sure to add your domain name when importing if the image references do not use absolute URLs.

Just curious as a result of going through all that Hugo documentation, what kind of approach are you taking with regard to Hugo version updates? We are up to 0.54, 0.60 introduces the new default markdown parser. Really, my only concern would be that at some point it may become difficult to rely on Hugo documentation on account of the necessity of their consistently including version support within their documentation.

@manton @moondeer How do I go about adding and formatting this frontmatter to a markdown post from Ulysses? I’ve tried to do this on my test site using the YAML format but it’s always treated it as plain text and included it in the post.

this is what we aren’t able to do yet, I believe. We can template stuff, or create entire pages, but we can’t get at our posted content in this way.

That’s correct. When importing an archive of Markdown files, Micro.blog will look for common frontmatter fields as described above, but when sending a new post to your blog, there’s no way to set custom frontmatter. Micro.blog sets it up for you based on whatever makes sense for the post, for example photo references and other metadata.

@manton @Moondeer Thank you both for your detailed responses, I appreciate it! I guess you can add my vote to the list for having some kind of frontmatter access in the future, especially for being able to customize the URL slug.

Hypothetically speaking if something were to happen that Micro.blog was no longer available (not that I’d ever wish that to happen of course :wink:), would having frontmatter functionality in the posts not make export to an external Hugo or Jekyll site easier? Maybe I’m not understanding exactly how the backup option works in terms of its portability to other systems.

Speaking of the front matter, @manton, it occurs to me that perhaps (if you are getting the images into the front matter) you could get the videos into the front matter so I can get videos working with open graph and twitter cards.

Update: or I suppose I oughta be able to parse the .Content for a video tag.

I thought Micro.blog was already setting a “videos” field in the front matter, just like it does for photos and audio, but it looks like that’s missing. I’ll update Micro.blog to support this so that templates can access the list of videos without needing to look in .Content.

1 Like

Are you posting: Ulysses → somewhere else → feed into Micro.blog
OR: Ulysses → Micro.blog?

@simonwoods This would be from Ulysses → Micro.blog

Ah OK. I was curious since part of the publishing flow includes setting the title and a few other things before submitting the post. Is there a reason why you would also set that data in the post? I assume there are some points missing in the overlay?

My confusion was from wanting to add frontmatter within the post, but that’s used when importing from an external blog such as Jekyll. You can set the title in the post with an H1 as the first line and it will be pre-populated when you publish in Ulysses, but that’s just for convenience sake.

TIL! :+1: