Skip to content

Commit

Permalink
Updated README with description of WordPress migration and adsense
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjmccormick committed May 2, 2016
1 parent d27c848 commit 6eba627
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,22 @@ Adding support for equations with MathJax was a cinch. I just put the following
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
{% endhighlight %}

WordPress Migration
===================
Since I work in Python, I used the [exitwp](https://github.com/thomasf/exitwp) tool to convert all of my wordpress posts to Jekyll posts in markdown. Wordpress has an option for exporting your entire site as one big XML file, and exitwp is able to take this in and spit out all the images and posts.

One thing I had to consider was "categories". I wanted to setup redirects from my Wordpress site to my Jekyll one, and the Wordpress redirect feature isn't customizeable. The issue this created is that Jekyll uses categories as part of the URL, but Wordpress does not. I opted to simply strip the categories from my posts to simplify things.

Another issue I faced was with the timezones. The funny thing about timezones is that if there are any inconsistencies, it's possible that your blog post will end up published on a different calendar date because of the time difference. I had just this issue, and it caused some of my redirect links to break. I just had to go through the posts and fix the timezones using some find/replace all magic.

Lastly, all of my images in my wordpress site were specifically set in the URL to be displayed at 470px wide. I just used some find/replace all to strip out all instances of this.

Google Adsense
==============
I put the Google Adsense code in `_includes/advertising.html` and then inserted in my `_layouts/posts.html` just above the comments.

It took a good day and a half or more before I saw any ads on my site. Until then, the Javascript Adsense Javascript was actually throwing an error! I could see the exception in the Chrome developer tools. Wish they handled that better--getting an exception on your code is unsettling!


[poole_repo]: https://github.com/poole/poole "Poole repository on GitHub"
[jl_poole]: http://joshualande.com/jekyll-github-pages-poole/ "Joshua Lande's blog post on Jekyll with Poole"

0 comments on commit 6eba627

Please sign in to comment.