diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-10-22 02:37:38 +0300 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-10-22 02:37:38 +0300 |
commit | 64e962905b47b177be8f21761d6145aa871571dc (patch) | |
tree | 41b940bc87561b5693b53be68fb70b38c9b9fdd8 /lib | |
parent | e96a8447c080b329240fadbc8b698476a94c4f78 (diff) |
Add some special logic for Omnibus URLs.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filters/edit_on_gitlab_link.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/filters/edit_on_gitlab_link.rb b/lib/filters/edit_on_gitlab_link.rb index 06010030..09e87587 100644 --- a/lib/filters/edit_on_gitlab_link.rb +++ b/lib/filters/edit_on_gitlab_link.rb @@ -16,7 +16,11 @@ module Nanoc::Filters # Replace `EDIT_ON_GITLAB_LINK` with the actual URL. content.gsub(/href="(EDIT_ON_GITLAB_LINK)"/) do |result| - result.gsub!(/EDIT_ON_GITLAB_LINK/, "https://gitlab.com/gitlab-org/gitlab-#{product}/blob/master/doc/#{content_filename}") + if product == "omnibus" + result.gsub!(/EDIT_ON_GITLAB_LINK/, "https://gitlab.com/gitlab-org/#{product}-gitlab/blob/master/doc/#{content_filename}") + else + result.gsub!(/EDIT_ON_GITLAB_LINK/, "https://gitlab.com/gitlab-org/gitlab-#{product}/blob/master/doc/#{content_filename}") + end result end end |