Questions before importing blog

Hi there! I’ve got a blog that was previously hosted on a custom DIY engine, and I’m considering moving that to micro.blog because, well, I’m getting too old for this :slight_smile:

While I was writing a script to convert posts, some questions came up:

  • AFAICT I can render any image URLs so that they point to the actual (currently served) images, and micro.blog will auto-download them, put them in an “uploads” folder, and replace the URL to that, correct?
  • I have a bunch of posts referencing other posts, tags, pages, etc. I figure that pages would retain their URL after switching the domain over, but what about posts and tags? What is the URL format for them? My URL scheme (domain.com/blog/YEAR/MONTH/DAY/slug, domain.com/blog/tag/TAG) is probably not the one used on micro.blog, so I probably need to reformat those URLs into URLs micro.blog can serve, correct?
  • I currently get micro.blog with the “external blog” feature, where it reads my RSS feed and recognizes any “micro post” to include in my timeline. How would that work once those posts are imported into a micro.blog post? Is there anything that I should do with these files’ frontmatter? How should I render any image tags/URLs?

Thanks!

Replying to myself for now on the second point: I don’t see any way to configure the URL format, but after visiting several micro.blog sites, it looks like everything is using the /YEAR/MONTH/DAY/SLUG.html format, so I can probably get interlinking to work by stripping /blog and adding .html at the end across all my markdown files.

For tags, it seems like this will be converted to categories and will therefore go to /categories/CATEGORY/, so I can do something similar.

How would I handle redirections from the old URLs to the new ones though? It’s not like I can drop a .htaccess or nginx config file anywhere? (the existing redirection support doesn’t seem to cover this)

I don’t know your setup but could you use your DNS to handle redirects? That is, you could create your new MB blog at a subdomain like: https://micro.mysite.com and still have https://mysite.com pointed at your existing setup where you do control the web server setup. Then, use .htaccess or nginx to respond to those root requests by formatting the path and tacking on the subdomain. That subdomain’s DNS would then be pointed to the micro blog.

That obviously assumes that you’re OK with some kind of subdomain. I can understand if you aren’t. However, it would preserve link integrity across the web and make it easier should you decide to move somewhere else later as you could repeat the process.

Outside of that, it’d be up the MB to support some sort of rewrite directives which it doesn’t yet do AFAIK.

1 Like

Thanks for the suggestions! I indeed thought about a subdomain but I ruled it out – my website is already a subdomain (firstname.lastname.com … two subdomains would be rather ugly!), and I don’t want to solve the problem of posts being in the wrong place by, arguably, putting posts in another wrong place :smiley:

I think you’re right, and that it might just not be possible until micro.blog improves the redirecting features. It does look like it does some automatic redirection after a Wordpress import, so there must be a file somewhere under the hood that could handle it, like maybe a map file. It might not be too much work for @manton to allow uploading a custom map file, but maybe I’m being naive here.

That’s right, internally Micro.blog keeps a reference to previous URLs for a page and will automatically redirect them. It sets this when importing from WordPress, Tumblr, and others, but currently there’s no way to edit it if you are manually importing posts. I’d love to open that up somewhere so that it’s possible to configure. Maybe a CSV import mapping or something like that.

There is also a redirect feature under Pages on the web, but it will be tedious if you need to create hundreds of them. It works well if you just have a handful of important URLs to keep redirecting.

1 Like

That would be great indeed! Thanks for considering it.