var ctx = window.location.pathname.substring(0, window.location.pathname.indexOf("/",2)) + "/";

var baseUrl = location.origin + ctx;



+ Recent posts