| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent db4576f commit 7f93faa
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -75,6 +75,10 @@ route '/**/index.*' do | |||
| 75 | 75 | item.identifier.without_ext + '.html' | |
| 76 | 76 | end | |
| 77 | 77 | ||
| 78 | + route '/404.html' do | ||
| 79 | + '/404.html' | ||
| 80 | + end | ||
| 81 | + | ||
| 78 | 82 | route '/**/*' do | |
| 79 | 83 | item.identifier.without_ext + '/index.html' | |
| 80 | 84 | end | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,8 @@ | |||
| 1 | + // before anything happens, check if this is a versionless enterprise URL | ||
| 2 | + path = window.location.pathname; | ||
| 3 | + paths = path.split("/"); | ||
| 4 | + if (paths[1] == "enterprise" && (paths[2].length === 0 || isNaN(paths[2]))) { | ||
| 5 | + paths.splice(2, 0, String({{ site.version }})); | ||
| 6 | + suffix = window.location.search || window.location.hash; | ||
| 7 | + window.location.href = window.location.protocol + "//" + window.location.host + paths.join("/") + suffix; | ||
| 8 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + --- | ||
| 2 | + title: GitHub Help • Article not found! | ||
| 3 | + exclude_from_search: true | ||
| 4 | + --- | ||
| 5 | + <div class="not-found-container"> | ||
| 6 | + <h2>Whoops, looks like that page doesn't exist.</h2> | ||
| 7 | + </div> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,13 +37,15 @@ gulp.task("javascript", function () { | |||
| 37 | 37 | gulp.src("assets/javascripts/dev_mode.js") | |
| 38 | 38 | .pipe(gulp.dest("output/assets/javascripts/")); | |
| 39 | 39 | return gulp.src([ | |
| 40 | + "assets/javascripts/initial.js", | ||
| 40 | 41 | "assets/javascripts/documentation.js", | |
| 41 | 42 | "assets/javascripts/search.js", | |
| 42 | 43 | "assets/javascripts/images.js", | |
| 43 | 44 | "assets/vendor/retinajs/src/retinajs" | |
| 44 | 45 | ]) | |
| 45 | 46 | .pipe(gulpif(transformCS, coffee())) | |
| 46 | 47 | .pipe(concat("application.js")) | |
| 48 | + .pipe(replace(/\{\{ site\.version \}\}/g, CONFIG.latest_enterprise_version)) | ||
| 47 | 49 | .pipe(gulpif(IS_PRODUCTION, uglify())) | |
| 48 | 50 | .pipe(gulp.dest("output/assets/javascripts")); | |
| 49 | 51 | }); | |
@@ -78,7 +80,8 @@ gulp.task("server", function() { | |||
| 78 | 80 | connect = require("gulp-connect"); | |
| 79 | 81 | connect.server({ | |
| 80 | 82 | port: 4000, | |
| 81 | - root: ["output"] | ||
| 83 | + root: ["output"], | ||
| 84 | + fallback: "output/404.html" | ||
| 82 | 85 | }); | |
| 83 | 86 | }); | |
| 84 | 87 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,12 +13,14 @@ pipeline_config: | |||
| 13 | 13 | asset_root: https://a248.e.akamai.net/assets.github.com/images/icons | |
| 14 | 14 | ||
| 15 | 15 | versions: | |
| 16 | - - &latest_version_number 2.4 | ||
| 16 | + - &latest_enterprise_version 2.4 | ||
| 17 | 17 | - 2.3 | |
| 18 | 18 | - 2.2 | |
| 19 | 19 | - 2.1 | |
| 20 | 20 | - 2.0 | |
| 21 | 21 | ||
| 22 | + latest_enterprise_version: *latest_enterprise_version | ||
| 23 | + | ||
| 22 | 24 | data_variables: | |
| 23 | 25 | - | |
| 24 | 26 | scope: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,5 @@ | |||
| 1 | + require 'json' | ||
| 2 | + | ||
| 1 | 3 | def config | |
| 2 | 4 | @config ||= symbolize_hash(YAML.load_file(File.join(File.dirname(__FILE__), '..', 'nanoc.yaml'))) | |
| 3 | 5 | end | |
| Back | FazBrowse Home | New Git URL |
0 commit comments