Skip to content

Commit

Permalink
fix(doc): absolute paths
Browse files Browse the repository at this point in the history
added replace for second and third level paths
  • Loading branch information
ygatesoupe committed Dec 17, 2015
1 parent 4652ad2 commit d054236
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,29 @@ module.exports = function (grunt) {

/* boosted mod */
replace: {
remplace: {
src: ['_gh_pages/**/*.html'],
paths1: {
src: ['_gh_pages/*.html'],
overwrite: true,
replacements: [{
from: 'href="/',
to: 'href="'
}]
},
paths2: {
src: ['_gh_pages/*/*.html'],
overwrite: true,
replacements: [{
from: 'href="/',
to: 'href="../'
}]
},
paths3: {
src: ['_gh_pages/*/*/*.html'],
overwrite: true,
replacements: [{
from: 'href="/',
to: 'href="../../'
}]
}
},
/* end mod */
Expand Down Expand Up @@ -588,8 +604,9 @@ module.exports = function (grunt) {
/* end mod */
grunt.registerTask('docs-js', ['uglify:docsJs']);
grunt.registerTask('lint-docs-js', ['jscs:assets']);
/* boosted mod */
grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'jekyll:docs', 'replace']);

/* end mod */
grunt.registerTask('prep-release', ['dist', 'docs', 'jekyll:github', 'htmlmin', 'compress']);

// Publish to GitHub
Expand All @@ -616,7 +633,6 @@ module.exports = function (grunt) {
grunt.task.run([
'dist',
'docs',
'jekyll:docs',
'connect:livereload',
'watch'
]);
Expand Down

0 comments on commit d054236

Please sign in to comment.