Skip to content

A tool to import from Blogger to Hugo

License

Notifications You must be signed in to change notification settings

President/blogimport

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

blogimport

Blogimport is a simple tool to convert Blogger's xml export data into Hugo-friendly markdown format.

The tool is really basic, you just pass it the name of the file you're converting, the directory in which to output the markdown files, and optionally a piece of metadata to add to each of the posts' frontmatter (which must be a single line of valid toml, such as -extra="type = "oldPost"").

Blogimport outputs the tags, the post title, the published date, and whether or not it's a draft as standard Hugo frontmatter. In addition, the updated date is added, as well as author name and uri, and an additional value of blogimport = true (which can be handy for having special handling in your Hugo templates for imported posts).

Finally, the original HTML content is ouput as the main content of the markdown file. Note that no processing is done on the content... HTML is valid markdown, and it's probably best not to muck with it, so blogimport doesn't touch it.

Here's a typical frontmatter output:

+++
title = "My cool title"
date = 2014-07-09T17:43:00Z
updated = 2014-07-22T07:11:52Z
tags = ["Hugo", "is", "awesome"]
draft = true
blogimport = true 
[author]
	name = "Nate Finch"
	uri = "https://plus.google.com/115818189328363361527"
+++

Note that only toml output is supported now. If you want to support something else, feel free to make a pull request. I set up the code to be pretty easy to update to output other formats.

About

A tool to import from Blogger to Hugo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Go 100.0%