Converting from WordPress to Hakyll?

249 views
Skip to first unread message

Conal Elliott

unread,
Jul 9, 2011, 2:37:07 PM7/9/11
to hak...@googlegroups.com
Has anyone converted their blog from WordPress to Hakyll? I'm looking for some pointers.

I did find an article about wordpress-->jekyll (http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/), some of which is helpful.

Thanks, - Conal

Ketil Malde

unread,
Jun 20, 2012, 5:56:39 AM6/20/12
to hak...@googlegroups.com, co...@conal.net
mat...@loskot.net writes:

>> Has anyone converted their blog from WordPress to Hakyll? I'm looking for
>> some pointers.

Yes. Or, I'm still chipping away on it.

>> I did find an article about wordpress-->jekyll (
>> http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/), some of
>> which is helpful.

> Would anyone care to give any suggestions about Wordpress to Hakyll
> migration?

Although I hesitate to call it a suggestion, I can tell you what I
did. Basically, I dumped the WP MySQL table to a file, and worked over
the HTML manually (using Emacs macros) to turn them into markdown.
There are probably better ways.

-k
--
If I haven't seen further, it is by standing in the footprints of giants

Roman Cheplyaka

unread,
Jun 20, 2012, 7:44:08 AM6/20/12
to hak...@googlegroups.com, co...@conal.net
* Ketil Malde <ke...@malde.org> [2012-06-20 11:56:39+0200]
> Although I hesitate to call it a suggestion, I can tell you what I
> did. Basically, I dumped the WP MySQL table to a file, and worked over
> the HTML manually (using Emacs macros) to turn them into markdown.
> There are probably better ways.

I think pandoc can convert HTML to markdown.

--
Roman I. Cheplyaka :: http://ro-che.info/

Mateusz Loskot

unread,
Jun 24, 2012, 10:27:20 AM6/24/12
to hak...@googlegroups.com
On 20 June 2012 10:56, Ketil Malde <ke...@malde.org> wrote:
> mat...@loskot.net writes:
>> Would anyone care to give any suggestions about Wordpress to Hakyll
>> migration?
>
> Although I hesitate to call it a suggestion, I can tell you what I
> did. Basically, I dumped the WP MySQL table to a file, and worked over
> the HTML manually (using Emacs macros) to turn them into markdown.

I've thought about WP's raw data processing, but leaving it as last resort.

> There are probably better ways.

ATM, I'm a bit busy, but I think I'll try with migration through
planet/RSS engine
similar to this:

http://blog.cuboxlabs.com/blog/2012/04/20/migrate-your-blog-to-octopress-using-planet-rb

When I manage to do it, I'll post here about results.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

Mateusz Loskot

unread,
Jun 27, 2012, 7:30:46 PM6/27/12
to hak...@googlegroups.com
On 27 June 2012 00:22, <mat...@loskot.net> wrote:
> On Sunday, 24 June 2012 15:27:20 UTC+1, Mateusz Loskot wrote:
>>
>> ATM, I'm a bit busy, but I think I'll try with migration through
>> planet/RSS engine similar to this:
>>
>>
>> http://blog.cuboxlabs.com/blog/2012/04/20/migrate-your-blog-to-octopress-using-planet-rb
>>
>> When I manage to do it, I'll post here about results.
>
>
> I've tried to import my posts using the planet.rb [1]
> It seems to have problems with <!-- more --!> so it imports incomplete posts
> through the feed.
> It also seems to have problems with handling titles, so it generates large
> number of files with names like "2011-12-17-.markdown".
> Not to mention it does not seem to handle HTML to Markdown well,
> so most of my posts consist of HTML copied form original versions in
> WordPress.
>
> So, I'm going to try different option.
>
> [1] https://github.com/pote/planet.rb

I have just tried to move all my posts (~400) and pages from
Wordpress to Markdown using exitwp [1] and it works well.
The result is impressively good.
I have had to take care of manual intervention wherever I used [text]
or [sourcecode] tags reltaed to syntax highlighting plugin.

So, I think exitwp could be recommend to Hakyll users who want to migrate.

[1] https://github.com/thomasf/exitwp

Jasper Van der Jeugt

unread,
Jun 28, 2012, 3:43:14 AM6/28/12
to hak...@googlegroups.com
exitwp certainly sounds interesting. You're always welcome to write a
short tutorial on it, or I could just link to it in the Hakyll FAQ?

Peace,
Jasper

Mateusz Loskot

unread,
Jun 28, 2012, 4:36:40 AM6/28/12
to hak...@googlegroups.com
On 28 June 2012 08:43, Jasper Van der Jeugt <m...@jaspervdj.be> wrote:
> exitwp certainly sounds interesting. You're always welcome to write a
> short tutorial on it, or I could just link to it in the Hakyll FAQ?

I haven't completed my migration yet and there may be some issues hiding.
So it's not ready to wrap up.
Once it's done, I'll try to describe the procedure.

Ian Ross

unread,
Sep 1, 2012, 5:46:28 AM9/1/12
to hak...@googlegroups.com
Hi Danny,

I don't know about HAML, but SCSS is easy to use with Hakyll. Just
install SASS, then add a rule like this

-- Compress CSS files.
match "css/*" $ do
route $ setExtension "css"
compile sass

where the sass compiler is defined as

-- | Process SCSS or CSS.
--
sass :: Compiler Resource String
sass = getResourceString >>> unixFilter "sass" ["-s", "--scss"]
>>^ compressCss

As for Turbinado, I'm not sure I understand. Hakyll generates a
static website that you can then serve using whatever server you like.
I used to use Cherokee, now use nginx, but I don't see any reason why
you couldn't use something like Turbinado or some other Haskell-based
server. That's one of the nice things about Hakyll: it doesn't tie
you to any particular server infrastructure.

Cheers,

Ian.

On 1 September 2012 03:36, <danny.pi...@gmail.com> wrote:
> On Thursday, June 28, 2012 4:36:40 AM UTC-4, Mateusz Loskot wrote:
>>
>> On 28 June 2012 08:43, Jasper Van der Jeugt <m...@jaspervdj.be> wrote:
>> > exitwp certainly sounds interesting. You're always welcome to write a
>> > short tutorial on it, or I could just link to it in the Hakyll FAQ?
>>
>> I haven't completed my migration yet and there may be some issues hiding.
>> So it's not ready to wrap up.
>> Once it's done, I'll try to describe the procedure.
>>
>
> Any updates? I'd love to be able to do this as well.
>
> I would also love to be able to use HAML[1] and SCSS[2] (oh, how lovely they
> are!) with Hakyll, but Turbinado[3] hasn't been updated in years ]=
>
> [1] http://haml.info/
> [2] http://sass-lang.com/
> [3] http://www.turbinado.org/

Mateusz Loskot

unread,
Jan 6, 2013, 8:06:14 AM1/6/13
to hak...@googlegroups.com, co...@conal.net
On 19 June 2012 20:27, <mat...@loskot.net> wrote:
> Hi,
>
> I'm bumping up this fairly old thread, but I have the very same question
> and the thread has no follow-ups.
>
> Would anyone care to give any suggestions about Wordpress to Hakyll
> migration?

It took me a while, but I have finally moved my blog to Hakyll [1].
So, I just posted explanation [2] on how I migrated my posts from WordPress to
Markdown in format and structure consumable by Hakyll.
Perhaps it will be helpful for others looking for easy ways to switch to Hakyll.

[1] http://mateusz.loskot.net/posts/2012/12/03/powered-by-hakyll/
[2] http://mateusz.loskot.net/posts/2013/01/06/moving-posts-from-wordpress-to-hakyll/

Mateusz Loskot

unread,
Jan 6, 2013, 8:07:33 AM1/6/13
to hak...@googlegroups.com
On 28 June 2012 08:43, Jasper Van der Jeugt <m...@jaspervdj.be> wrote:
> exitwp certainly sounds interesting. You're always welcome to write a
> short tutorial on it, or I could just link to it in the Hakyll FAQ?

Jasper, I've just remembered your suggestion.
Here is my explanation:

http://mateusz.loskot.net/posts/2013/01/06/moving-posts-from-wordpress-to-hakyll/
Reply all
Reply to author
Forward
0 new messages