Created
July 30, 2012 16:12
-
-
Save hjerpbakk/3208100 to your computer and use it in GitHub Desktop.
Redirection of induvidual posts. From http://hjerpbakk.com/blog/2012/7/30/how-to-move-from-blogger-to-squarespace.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<b:widget id='Blog55' locked='true' title='Blog Posts' type='Blog'> | |
<b:includable id='main'> | |
<b:if cond='data:blog.pageType == "item"'> | |
<b:loop values='data:posts' var='post'> | |
<script type='text/javascript'> | |
var timestamp = '<data:post.timestamp/>'; | |
timestamp = timestamp.split('/'); | |
timestamp = timestamp[2]+'/'+timestamp[0].replace(/^[0]+/g,"")+'/'+timestamp[1].replace(/^[0]+/g,"")+'/'; | |
var permalink = '<data:post.url/>'; | |
var linkParts = permalink.split('/'); | |
var pageName = linkParts[5]; | |
if (pageName == "saving-configuration-in-c.html") | |
{ | |
pageName = "saving-a-configuration-in-c.html"; | |
} | |
var newURL ="http://hjerpbakk.com/blog/" + timestamp + pageName; | |
document.location.href = newURL; | |
</script> | |
</b:loop> | |
</b:if> | |
</b:includable> | |
</b:widget> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment