Permalink
Browse files

[minor] Added support for 301 content redirections

[minor] Move FAQ out of the `a-quickstart` it should be a separate section.
  • Loading branch information...
1 parent 0aac240 commit cfbd4ff55670bee566c2a76208f78230978bb6f1 @3rd-Eden 3rd-Eden committed May 15, 2013
Showing with 14 additions and 0 deletions.
  1. +3 −0 301.json
  2. +6 −0 README.md
  3. 0 content/{a-quickstart/faq.md → faq/index.md}
  4. +5 −0 index.js
View
@@ -0,0 +1,3 @@
+{
+ "/a-quickstart/faq/": "/faq/"
+}
View
@@ -28,6 +28,12 @@ subdirectory. Only markdown files included in the catalog.
Note: each subdirectory is expected to at least have an index.md to generate a
proper catalog.
+## Moving around content
+When you want to move content or complete folders you should update the
+`301.json` file that is in the root of the git repository. This way implementors
+can redirect urls easily without getting 404's. If you are removing content you
+don't need to change anything as it's supposed to 404.
+
## Images
Images must be added to [/resource][resource]. Our [CDN][cdn] will ensure
images are fetched from the repository and properly cached. Linking to an
File renamed without changes.
View
@@ -289,5 +289,10 @@ Handbook.prototype.search = function (query) {
return this.idx.search.call(this.idx, query);
};
+//
+// Expose the 301 routes for the handbook.
+//
+Handbook.redirect = require('./301.json');
+
// Expose public functions.
module.exports = Handbook;

0 comments on commit cfbd4ff

Please sign in to comment.