This post originated from an RSS feed registered with Java Buzz
by Andrej Koelewijn.
Original Post: Moving from Wordpress to Jekyll
Feed Title: Andrej Koelewijn
Feed URL: http://feeds.feedburner.com/AndrejKoelewijn
Feed Description: On Oracle, Java and OpenSource
I’m a slow mover here, far behind the hype-curve, but this blog is currently being moved to jekyll. The following are some notes and links from this process.
This is where is spent most of my time. There are automatic conversion scripts, but i still need to do a bit of manual work on every post to create nice markdown formatted posts.
The following gedit external tool script helps converting html posts to markdown posts:
#!/bin/sh
sed 's/\r//g' | \
sed 's/\[sourcecode.*\]/<pre><code>/g' | \
sed 's/\[\/sourcecode\]/<\/pre><\/code>/g' | \
sed 's/\[code.*\]/<pre><code>/g' | \
sed 's/\[\/code\]/<\/pre><\/code>/g' | \
sed 's/^$/<div\/>/g' | \
pandoc -f html -t markdown --reference-links --indented-code-classes=code
Some manual changes:
- Replace image links.
- Modify embed tags used to include svg images. Now using image tags.
The result is much cleaner post text.
syntax highlighting
Using a javascript based codehightlighter: [google code prettify].
Automatic conversion of image links in html to markdown didn’t work as well as i hoped. The following was created for html links showing a thumbnail image and linking to a fullsize image: