Moving From Wordpress To Jekyll - Data Cleanup
Time to do some cleanup.
Authors
Jekyll supports defining authors in one place (I’ve added them to my _config.yml) but for some reason the import process added the following to all my posts:
This can be replaced with the following in each of my posts:
So much easier. :-)
Because the text was the same for every page I was able to do a “Find in Folder” in Sublime Text and be done with it.
Meta
Another thing that was pulled in was this meta information at the top of each post:
The annoying part is that it wasn’t the same everywhere:
This required a little more work. I used the following regular expression to find meta: to author and then I replaced it with author.
(?s)meta.+?author
Embedded YouTube
Using Wordpress I was able to add the following to a post and have it fill in the correct YouTube video:
[embed]http://www.youtube.com/watch?v=Z1IqzeA3XXg[/embed]
But that doesn’t work in Jekyll (not that I really expected it too). The only way I found to fix this was to open the link individually and grab the new embed code. It’s a good thing there were only a couple posts with videos.
Code Samples
The code samples I had in Wordpress came into Jekyll like this:
Which outputs like this:
public static function testFunction()
This is okay but Jekyll supports highlights that looks way better:
By using blocks like this:
{% highlight php5 startinline %}
public static function testFunction()
{% endhighlight %}
I’m not going to kill myself fixing all of these but I am going to go through the posts that get the most traffic and fix them.
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows