Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/helpers/edit_on_gitlab.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/helpers/edit_on_gitlab.rb b/lib/helpers/edit_on_gitlab.rb
index 9f7147ca..aa7b5c54 100644
--- a/lib/helpers/edit_on_gitlab.rb
+++ b/lib/helpers/edit_on_gitlab.rb
@@ -9,6 +9,7 @@ module Nanoc::Helpers
product = content_filename_array.shift
# This should be the path from the doc/ directory for a given file.
docs_content_filename = content_filename_array.join("/")
+ root_dir = File.expand_path('../../', __dir__)
if product == "omnibus"
# omnibus-gitlab repo
@@ -16,8 +17,12 @@ module Nanoc::Helpers
elsif product == "runner"
# gitlab-runner repo
gitlab_url = "https://gitlab.com/gitlab-org/gitlab-#{product}/blob/master/docs/#{docs_content_filename}"
- elsif (product == "ce" or product == "ee")
+ elsif %w[ce ee].include?(product)
# gitlab-ce and gitlab-ee repos
+ if product == "ee"
+ ce_file = File.join(root_dir, @item[:content_filename].sub(@config[:products][:ee][:dirs][:dest_dir], @config[:products][:ce][:dirs][:dest_dir]))
+ product = "ce" if File.exists?(ce_file)
+ end
gitlab_url = "https://gitlab.com/gitlab-org/gitlab-#{product}/blob/master/doc/#{docs_content_filename}"
else
# gitlab-docs pages