Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Sync changes from upstream repository#939

Merged
hubot merged 1 commit intomasterfromupdate-1450766456
Dec 22, 2015
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletionsRules
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,6 +75,10 @@ route '/**/index.*' do
item.identifier.without_ext + '.html'
end

route '/404.html' do
'/404.html'
end

route '/**/*' do
item.identifier.without_ext + '/index.html'
end
Expand Down
8 changes: 8 additions & 0 deletionsassets/javascripts/initial.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
// before anything happens, check if this is a versionless enterprise URL
path = window.location.pathname;
paths = path.split("/");
if (paths[1] == "enterprise" && (paths[2].length === 0 || isNaN(paths[2]))) {
paths.splice(2, 0, String({{ site.version }}));
suffix = window.location.search || window.location.hash;
window.location.href = window.location.protocol + "//" + window.location.host + paths.join("/") + suffix;
}
7 changes: 7 additions & 0 deletionscontent/404.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
---
title: GitHub Help • Article not found!
exclude_from_search: true
---
<div class="not-found-container">
<h2>Whoops, looks like that page doesn't exist.</h2>
</div>
5 changes: 4 additions & 1 deletiongulpfile.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,13 +37,15 @@ gulp.task("javascript", function () {
gulp.src("assets/javascripts/dev_mode.js")
.pipe(gulp.dest("output/assets/javascripts/"));
return gulp.src([
"assets/javascripts/initial.js",
"assets/javascripts/documentation.js",
"assets/javascripts/search.js",
"assets/javascripts/images.js",
"assets/vendor/retinajs/src/retinajs"
])
.pipe(gulpif(transformCS, coffee()))
.pipe(concat("application.js"))
.pipe(replace(/\{\{ site\.version \}\}/g, CONFIG.latest_enterprise_version))
.pipe(gulpif(IS_PRODUCTION, uglify()))
.pipe(gulp.dest("output/assets/javascripts"));
});
Expand DownExpand Up@@ -78,7 +80,8 @@ gulp.task("server", function() {
connect = require("gulp-connect");
connect.server({
port: 4000,
root: ["output"]
root: ["output"],
fallback: "output/404.html"
});
});

Expand Down
4 changes: 3 additions & 1 deletionnanoc.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,12 +13,14 @@ pipeline_config:
asset_root: https://a248.e.akamai.net/assets.github.com/images/icons

versions:
- &latest_version_number 2.4
- &latest_enterprise_version 2.4
- 2.3
- 2.2
- 2.1
- 2.0

latest_enterprise_version: *latest_enterprise_version

data_variables:
-
scope:
Expand Down
2 changes: 2 additions & 0 deletionstasks/utils.rake
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
require 'json'

def config
@config ||= symbolize_hash(YAML.load_file(File.join(File.dirname(__FILE__), '..', 'nanoc.yaml')))
end
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp