Git clone vs Git submodule
Having recently made the switch from svn to git, I wanted to achieve what svn externals did (and wha
Over the weekend I migrated from Blogger (hosted by Google) to Wordpress (hosted by me). Overall, Wordpress feels far superior, but the migration was not without problems. Here's a short guide to what I had to do:
First, grab the latest version of Wordpress. Being a PHP application, it just drops into a directory and works :)
Wordpress has a setup script but being a bit of a noob I couldn't give it write permission to my filesystem. If you are also afflicted by such inadequacies the following steps may help you. For clarity I'll call my DB 'wordpress'. First, set up your database:
You'll need a wp-config.php file - Wordpress comes with a default one which you can copy thusly (in the root directory of your wordpress directory):
Now edit wp-config.php, and fill in the details to make it look a little like this:
Hitting the site now should show a default Wordpress installation with some dummy content. Whoop.
Importing from Blogger is pleasingly simple - just use the Tools -> Import option on the menu. It'll ask you to verify access and then pull down all your posts and comments.
It's not perfect though - for me the post Tags were imported as Categories. To get them to be Tags again, go to the Posts -> Categories menu and use the handy Categories to Tags converter.
I found that the imported Post markup was pretty mangled (I think this is Blogger's fault, not Wordpress') -
s everywhere and no line breaks. To resolve this I cracked open mysql again and ran the following:
/%year%/%monthnum%/%postname%.html
Wordpress will either write a .htaccess file for you at this point, or tell you it can't write to the filesystem and give you a short text config which you must manually copy into a file called .htaccess.
One final thing to note is that Wordpress constructs its slug urls differently to Blogger (Wordpress would use 'the-trouble-with-new' vs Blogger's 'trouble-with-new', for example). If you're importing blog posts this means your urls won't always match, so any incoming links will be broken. I couldn't find an easier way to correct them than just copy/paste by hand - doesn't take long though.
This whole step is entirely optional.
Because I'm a geek I post code fairly often. I used the SyntaxHighlighter library back in the Blogger days and wanted to keep using it. You can install the Wordpress plugin version from http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/. The old syntax didn't seem to work, so I needed to go back into mysql and run the following:
NOTE: So that Wordpress doesn't interpret those tags above I've changed the 'o' in code to a '0'. You need to change it back :)
This just swaps all your old
andtags for [c0de language="js"]and [/c0de] respectively. Repeat the first line for any other languages you have used (for me this was xml, css, html and ruby).
Wordpress doesn't like the world to see your content via RSS. Odd, isn't it? There's an option in Settings -> Reading which claims to output the full text of each article into your feed, but it doesn't seem to work. Instead, what you need to do is hack your theme a little. You'll need to edit the wp-includes/feed-rss2.php file and change line 47 from <?php the_excerpt_rss() ?>
to <?php the_content() ?>
.
If you're using Feedburner or similar, don't forget to give it your new feed url too. In this case you should also update wp-content/themes/yourTheme/header.php and swap out the occurrences with your Feedburner url.
At this point everything should be working nicely, so upload your blog folder and update your DNS settings. I'm guessing if you're hosting Wordpress yourself you don't need help with this. I've made my own blog into a git repository up on Github, allowing me to deploy any changes I make using Capistrano. It's a nice solution - for more information see this lovely post by the gentlemen at imedo.
For further reading, consider exploring the intricacies of JavaScript testing frameworks with Autotesting JavaScript with Jasmine and Guard, which provides insights into efficient test automation. Additionally, you might be interested in Jasmine and Jenkins Continuous Integration, which delves into the seamless integration of testing frameworks with continuous integration environments.
Having recently made the switch from svn to git, I wanted to achieve what svn externals did (and wha
A lot has changed in the last few years when it comes to implementing applications using JavaScript.
Markdown is a really nice way to write content like blog posts and other long-form content, with live components inside
I use Jasmine as my JavaScript unit/behavior testing framework of choice because it's elegant and ha