improve.dk - just migrated from Wordpress to Hexo









Search Preview

Migrating from Wordpress to Hexo | Mark S. Rasmussen

improve.dk
Mark S. Rasmussen improve.dk About Me Pages
.dk > improve.dk

SEO audit: Content analysis

Language Error! No language localisation is found.
Title Migrating from Wordpress to Hexo | Mark S. Rasmussen
Text / HTML ratio 47 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud = var Wordpress post posts image file Server SQL Hexo dataslug assets source blog style Github backup imgLink I’ve cb
Keywords consistency
Keyword Content Title Description Headings
= 22
var 17
Wordpress 9
post 9
posts 9
image 8
Headings
H1 H2 H3 H4 H5 H6
1 3 0 0 0 0
Images We found 0 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
= 22 1.10 %
var 17 0.85 %
Wordpress 9 0.45 %
post 9 0.45 %
posts 9 0.45 %
image 8 0.40 %
file 7 0.35 %
Server 7 0.35 %
SQL 7 0.35 %
Hexo 7 0.35 %
dataslug 6 0.30 %
assets 6 0.30 %
source 6 0.30 %
blog 5 0.25 %
style 5 0.25 %
Github 5 0.25 %
backup 5 0.25 %
imgLink 5 0.25 %
I’ve 4 0.20 %
cb 4 0.20 %

SEO Keywords (Two Word)

Keyword Occurrence Density
SQL Server 7 0.35 %
seeing as 6 0.30 %
to be 4 0.20 %
of the 4 0.20 %
the source 4 0.20 %
the post 4 0.20 %
style = 3 0.15 %
on Github 3 0.15 %
I needed 3 0.15 %
needed to 3 0.15 %
itself is 3 0.15 %
While I 3 0.15 %
each post 3 0.15 %
to the 3 0.15 %
need to 3 0.15 %
I had 3 0.15 %
dataslug var 3 0.15 %
with the 3 0.15 %
had to 2 0.10 %
well as 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
Mark S Rasmussen 2 0.10 % No
backup XML file 2 0.10 % No
blog itself is 2 0.10 % No
I had to 2 0.10 % No
itself is hosted 2 0.10 % No
is hosted on 2 0.10 % No
hosted on Github 2 0.10 % No
and keep it 2 0.10 % No
keep it updated 2 0.10 % No
as well as 2 0.10 % No
I needed to 2 0.10 % No
a static site 2 0.10 % No
to write a 2 0.10 % No
static site generator 2 0.10 % No
the Github CDN 2 0.10 % No
= pathjoinpublicDir dataslug 2 0.10 % No
I ended up 2 0.10 % No
style = 'float 2 0.10 % No
20px' break case 1 0.05 % No
= 'float right 1 0.05 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
is hosted on Github 2 0.10 % No
a static site generator 2 0.10 % No
and keep it updated 2 0.10 % No
blog itself is hosted 2 0.10 % No
itself is hosted on 2 0.10 % No
imgMaxHeight '>
' Let hexo
1 0.05 % No
continue cb Hosting Security 1 0.05 % No
hexo continue cb Hosting 1 0.05 % No
Let hexo continue cb 1 0.05 % No
'>
' Let hexo continue
1 0.05 % No
Mark S Rasmussen improvedk 1 0.05 % No
' imgMaxHeight '>
' Let
1 0.05 % No
Hosting Security Backup Speed 1 0.05 % No
style=maxheight ' imgMaxHeight '>
'
1 0.05 % No
' style=maxheight ' imgMaxHeight 1 0.05 % No
imgLink ' style=maxheight ' 1 0.05 % No
src=' imgLink ' style=maxheight 1 0.05 % No
cb Hosting Security Backup 1 0.05 % No
Speed Due to its 1 0.05 % No
Security Backup Speed Due 1 0.05 % No

Internal links in - improve.dk

About Me
About Me | Mark S. Rasmussen
Misc
Misc | Mark S. Rasmussen
Miscellaneous
Miscellaneous | Mark S. Rasmussen
just migrated from Wordpress to Hexo
Migrating from Wordpress to Hexo | Mark S. Rasmussen
http://improve.dk/sql-server-mirroring-a-practical-approach/
SQL Server Mirroring - A Practical Approach | Mark S. Rasmussen
save the day
SQL Server Corruption Recovery - When All Else Fails | Mark S. Rasmussen
OrcaMDF’s Corruptor class
Corrupting Databases on Purpose Using the OrcaMDF Corruptor | Mark S. Rasmussen
RawDatabase
OrcaMDF RawDatabase - A Swiss Army Knife for MDF Files | Mark S. Rasmussen
OrcaMDF
Introducing OrcaMDF | Mark S. Rasmussen
dynamically recreating common DMVs
OrcaMDF Now Exposes Metadata Through System DMVs | Mark S. Rasmussen
simple GUI
OrcaMDF Studio Release + Feature Recap | Mark S. Rasmussen
as I’ve already got my iPad next to me when presenting
Keeping Track of Time While Presenting | Mark S. Rasmussen
« Past
Mark S. Rasmussen
AS/Flex/Flash
AS/Flex/Flash | Mark S. Rasmussen
IIS
IIS | Mark S. Rasmussen
Life
Life | Mark S. Rasmussen
Performance
Performance | Mark S. Rasmussen
Testing
Testing | Mark S. Rasmussen
Umbraco
Umbraco | Mark S. Rasmussen
Web
Web | Mark S. Rasmussen
Windbg
Windbg | Mark S. Rasmussen
Windows
Windows | Mark S. Rasmussen
2009
2009 | Mark S. Rasmussen
2008
2008 | Mark S. Rasmussen
2007
2007 | Mark S. Rasmussen
2006
2006 | Mark S. Rasmussen

Improve.dk Spined HTML


Migrating from Wordpress to Hexo | Mark S. Rasmussen Mark S. Rasmussen improve.dk About Me Pages Categories Archive Apr 19 2014 Migrating from Wordpress to Hexo Miscellaneous Comments It’s this time of the year then - the time to migrate from one blog engine to another. About a year ago, I migrated from Subtext to Wordpress. While I was initially happy, I still wasn’t completely satisfied with the workflow. My primary peeves were: Complexity - I had to pay a host to run a stack consisting of PHP and MySQL and alimony it updated. Security - I needed to constantly alimony watch over Wordpress and alimony it updated, seeing as it’s a popular target for mass defacements, etc. Backups - While I did run an streamlined replacement plugin, it was cumbersome as I needed an offsite location (i used FTP). Writing - While the WYSIWYG editor works for some, it didn’t for me. As such I ended up writing all my posts in pure HTML. Openness - I’m a big proponent of unshut source and while I did publish the source lawmaking for my custom Wordpress theme, I wanted to moreover unshut up my blog posts themselves. Speed - I’ve spent increasingly time than I’d like to, just keeping Wordpress running smoothly. A lot of things were outside of my tenancy though, seeing as performance optimization was typically relegated to third party plugins. While considering the whilom list, I ended up settling on Hexo - a static site generator powered by Node.js. Migration The migration process was simple enough, though it required some transmission labor. All my Wordpress posts are written in HTML and since Hexo posts are based on Markdown, they needed to be converted.Withoutdumping my old Wordpress site into a replacement XML file, I was worldly-wise to write a script that parsed the replacement XML file and converted each post into the Hexo Markdown format. There were some misses that required transmission intervention, seeing as I had invalid HTML, special cases, etc. But overall, 95% of the posts were converted automatically. Since Hexo is a static site generator, I needed to host my comments offsite. Thankfully Disqus has native support for the Wordpress scuttlebutt replacement format so importing the comments was a breeze. Hexo does not support storing resources and posts in folders but prefers to store posts and resources seperately. As I like to alimony them together (seeing as I’ve got tropical to 300 posts), I had to write a small script that copied the resources into the right output locations: var fs = require('fs'); var path = require('path'); var publicDir = hexo.public_dir; var sourceDir = hexo.source_dir; var postsDir = path.join(sourceDir, '_posts'); var htmlTag = hexo.util.html_tag; var route = hexo.route; // Stores resources that'll need to be copied to the post output folders var filesToCopy = []; //WithoutHexo's washed-up generating, we'll reprinting post resources to their public folderse hexo.on('generateAfter', function() { filesToCopy.forEach(function(obj) { fs.writeFileSync(obj.destination, fs.readFileSync(obj.source)); }); }); // Each time a post is rendered, note that we need to reprinting its resources hexo.extend.filter.register('post', function(data, cb) { if (data.slug) { var postDir = path.join(postsDir, data.slug); var files = fs.readdirSync(postDir); files.forEach(function(file) { // Skip the markdown files themselves if (path.extname(file) == '.md') return; var outputDir = path.join(publicDir, data.slug); var outputPath = path.join(publicDir, data.slug, file); var inputPath = path.join(postDir, file); if (!fs.existsSync(outputDir)) fs.mkdirSync(path.join(outputDir)); filesToCopy.push({ source: inputPath, destination: outputPath }); }); } cb(); }); Though Hexo has a number of helpers to hands insert image links, I prefer to be worldly-wise to just write an image name on a line by itself and then have the windfall link inserted. Enabling that was easy unbearable too: // Replaces lines with image names with the very image markup hexo.extend.filter.register('pre', function(data, cb) { // Find all matching image tags var regex = new RegExp(/^([a-z_0-9\-\.]+(?:.jpg|png|gif))(?: ([a-z]+)( \d+)?)?$/gim); data.content = data.content.replace(regex, function(match, file, type, maxHeight) { // Create image link var imgLink; if (data.slug) // Posts need to reference image veritably imgLink = '/' + data.slug + '/' + file; else imgLink = file; // Max height of image var imgMaxHeight = '250px'; if (maxHeight) imgMaxHeight = maxHeight + 'px'; // Set style depending on type var style = ''; if (type) { switch (type) { specimen 'right': style = 'float: right; margin: 20px'; break; specimen 'left': style = 'float: left'; break; } } return '<div class="imgwrapper" style="' + style + '"><div><a href="' + imgLink + '" class="fancy"><img src="' + imgLink + '" style="max-height: ' + imgMaxHeight + '"/></a></div></div>'; }); // Let hexo protract cb(); }); Hosting, Security,Replacement& Speed Due to its static nature, there are no logins to protect, per se - seeing as there’s no backend. The blog itself is hosted on Github, both the source as well as the statically generated output files. This ways I’ve got full replacement in the form of distributed git repositories, as well as very easy rollback in specimen of mistakes. As for speed, it doesn’t get much faster than serving static files. Comments are lazily loaded without the post itself is loaded. While I can’t utilize the Github CDN (seeing as I’m hosting the blog at an noon domain, making it untellable for me to setup a CNAME - which is required to use the Github CDN), the speed is way faster than it used to be on Wordpress. I could move my DNS to a registrar that supports noon aliasing, but I’m happy with the speed for now. Openness Finally, since the source for the blog itself is hosted on Github, including the posts themselves, each post is unquestionably editable directly on Github. You’ll notice that I’ve widow an Octocat link at the marrow of each post, next to the social sharing icons. Clicking the Octocat will lead you directly to the source of the post you’re looking at. If you find an error or have a suggestion for an edit, finger self-ruling to fork the post and submit a pull request. Mark S. Rasmussen I'm the CTO at iPaper where I petting with databases, mold lawmaking and maintain the overall technical & team responsibility. I'm an voracious speaker at user groups & conferences. I love life, motorcycles, photography and all things technical. Say hi on Twitter, write me an email or squint me up on LinkedIn. CATEGORIES .NETAS/Flex/FlashAmazon Web ServicesComputer ScienceConferences and PresentingIISLifeMiscMiscellaneousPerformancePokerSQL ServerSQL Server - CommunitySQL Server - Data TypesSQL Server - InternalsSQL Server - OptimizationSQL Server - OrcaMDFSQL Server - TricksTestingTools of the TradeUmbracoVisual StudioWebWindbgWindows ARCHIVE 201420132012201120102009200820072006 Copyright © 2014 Mark S. Rasmussen