You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/07/04 13:49:37 UTC
brooklyn-docs git commit: clarify PDF vars
Repository: brooklyn-docs
Updated Branches:
refs/heads/master 309ceba9f -> 20ac9f622
clarify PDF vars
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/20ac9f62
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/20ac9f62
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/20ac9f62
Branch: refs/heads/master
Commit: 20ac9f622c8c0f7b32b508434ccc6386bf76dc75
Parents: 309ceba
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Mon Jul 4 14:49:20 2016 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Mon Jul 4 14:49:20 2016 +0100
----------------------------------------------------------------------
_config.yml | 5 +++--
_plugins/regex_filter.rb | 8 ++++----
2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/20ac9f62/_config.yml
----------------------------------------------------------------------
diff --git a/_config.yml b/_config.yml
index fe89f7a..09ef041 100644
--- a/_config.yml
+++ b/_config.yml
@@ -45,13 +45,14 @@ exclude: ['/Gemfile*','/README.md']
sass:
sass_dir: style/css
+# TODO the 0.9.0 paths must be changed!
brooklyn-stable-version: 0.9.0
-brooklyn-base-url: https://brooklyn.apache.org
+pdf-default-base-url: http://brooklyn.apache.org
+pdf-default-versioned-url-subpath: /v/0.9.0
pdf-rewrite-prefixes:
'/guide' : '/v/0.9.0'
'/website' : ''
- '/community' : '/community'
brooklyn-version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION
brooklyn-snapshot-git-branch: master # if line above is SNAPSHOT this should point to corresponding git branch (e.g. master, 0.4)
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/20ac9f62/_plugins/regex_filter.rb
----------------------------------------------------------------------
diff --git a/_plugins/regex_filter.rb b/_plugins/regex_filter.rb
index b82169d..5a96223 100644
--- a/_plugins/regex_filter.rb
+++ b/_plugins/regex_filter.rb
@@ -26,7 +26,7 @@ module RefactorURL
if input == nil
return nil
end
-
+
# generate document id, this will be used for the anchors
$pid = "id-undefined"
if currentPage['title'] != nil
@@ -100,12 +100,12 @@ module RefactorURL
# make an absolute external URL for the link
if $match.start_with?(prefix[0])
$notFoundPrefix = false
- $newLink = site['brooklyn-base-url']+prefix[1]+$match[prefix[0].length, $match.length]
+ $newLink = site['pdf-default-base-url']+prefix[1]+$match[prefix[0].length, $match.length]
end
end
if $notFoundPrefix
- puts $match+" not found prefix"
- $newLink = site['brooklyn-base-url']+"/v/"+site['brooklyn-version']+$match
+ $newLink = site['pdf-default-base-url']+site['pdf-default-versioned-url-subpath']+$match
+ puts "PDF link to "+$match+" in "+currentPage['path']+" has unknown prefix, routing to "+$newLink
end
end
end