Giter Site home page Giter Site logo

octohug's Introduction

octohug

the octopress to hugo migrator

To use octohug, compile octohug.go and drop octohug into your octopress blog directory. octohug does this:

  • converts the octopress post header to a hugo post header
  • converts octopress categories and tags to the hugo equivalent in the post header
  • replaces include_file in the octopress post body with the file content

gotchas

I had a couple of octopress posts where the title attribute was spread across two lines. There were only two posts like this so I didn't think it worth the hassle of coding a solution. It's much easier to just open the converted file and delete the errant line. You'll know you have one as hugo will throw an error with a two line title.

octohug ignores a lot of octopress headers as I don't use them. Fork and change to suit. There will prolly be lots more headers it doesn't know about that I don't use so if you get weird hugo errors, have a look in the converted file's header and fork/fix for your environment.

what to do

let's say you have an octopress blog in ~/octo/blog and a shiny new, empty hugo blog in ~/hugo/blog.

	go build octohug.go
	cp octohug ~/octo/blog
	cd ~/octo/blog
	./octohug

you'll now have a ~/octo/blog/content/post directory

	cp -r ~/octo/blog/content/post ~/hugo/blog/content

if there are octopress header attributes octohug doesn't know about they'll end up in the hugo header. Fork/fix to suit.

sorting the feed

the octopress feed is at atom.xml while the hugo one is at index.xml so I needed an entry in .htaccess:

	RedirectMatch 301 ^/blog/atom.xml$ http://codebrane.com/blog/index.xml

give octopress a big hug

octopress got me out of wordpress. It's been superb and a great introduction to static blogs and sites. So long octopress and thanks for al the posts!

octohug's People

Contributors

codebrane avatar keltia avatar glacjay avatar creativepsyco avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.