cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject docs commit: Fixing up /latest logic and 404 logic.
Date Sat, 07 Nov 2015 03:46:37 GMT
Repository: cordova-docs
Updated Branches:
  refs/heads/master da5605268 -> d0883c262


Fixing up /latest logic and 404 logic.


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/d0883c26
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/d0883c26
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/d0883c26

Branch: refs/heads/master
Commit: d0883c262d3a835c5a477cbe4a9e51a204a0fed1
Parents: da56052
Author: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Authored: Fri Nov 6 19:46:32 2015 -0800
Committer: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Committed: Fri Nov 6 19:46:32 2015 -0800

----------------------------------------------------------------------
 www/.htaccess        | 6 +++++-
 www/static/js/404.js | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d0883c26/www/.htaccess
----------------------------------------------------------------------
diff --git a/www/.htaccess b/www/.htaccess
index a76676c..eafc4eb 100644
--- a/www/.htaccess
+++ b/www/.htaccess
@@ -28,6 +28,10 @@ RewriteEngine on
 RewriteRule ^.*docs/$ {{site.baseurl}}/docs/en/
 RewriteRule ^.*docs/(\w\w)/$ {{site.baseurl}}/docs/$1/latest/ [R=302,L]
 
+# 302:
+#       docs/XX/latest -> docs/XX/latest/
+RewriteRule ^.*docs/(\w\w)/latest$ {{site.baseurl}}/docs/$1/latest/ [R=302,L]
+
 # rewrite only:
 #       /docs/XX/latest/* -> /docs/XX/Y.Y.Y/*
 #
@@ -44,4 +48,4 @@ RewriteRule ^.*docs/(\w\w)/latest/(.*)$ {{site.baseurl}}/docs/$1/{{site.latest_d
 #       The first part of the path (i.e. the ".*") is
 #       thrown away and replaced by site.baseurl.
 {% for redirect in site.data.docs-redirects %}
-RewriteRule ^.*docs/(\w\w)/([^/]+)/{{redirect.old}}$ {{site.baseurl}}/docs/$1/$2/{{redirect.new}}
[R=301]{% endfor %}
+RewriteRule ^.*docs/(\w\w)/([^/]+)/{{redirect.old}}$ {{site.baseurl}}/docs/$1/$2/{{redirect.new}}
[R=301,L]{% endfor %}

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d0883c26/www/static/js/404.js
----------------------------------------------------------------------
diff --git a/www/static/js/404.js b/www/static/js/404.js
index c477282..900297b 100644
--- a/www/static/js/404.js
+++ b/www/static/js/404.js
@@ -48,7 +48,7 @@
         var baseURL       = splitURL[0];
         var versionString = splitURL[1];
 
-        return baseURL + versionString;
+        return baseURL + versionString + "/";
     }
 
     function isDocsURL(url) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message