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:
authorAchilleas Pipinellis <axil@gitlab.com>2018-06-19 08:42:53 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-06-19 08:42:53 +0300
commit3dee332a0113e53e56b1babf81e09c94273ea494 (patch)
tree5ad1dbe239676f79998f53303329768a6faf89bc
parent9fe24659128e39d1def05f0091c1354b8545fb5d (diff)
Link to the blob page when "Edit this page"
Better link to the blob page of a file where you can choose to edit the file using the simple edit function or the web IDE. That's also good for times when you just want to check the history of the file.
-rw-r--r--lib/helpers/edit_on_gitlab.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/helpers/edit_on_gitlab.rb b/lib/helpers/edit_on_gitlab.rb
index fbb1609c..9f7147ca 100644
--- a/lib/helpers/edit_on_gitlab.rb
+++ b/lib/helpers/edit_on_gitlab.rb
@@ -12,16 +12,16 @@ module Nanoc::Helpers
if product == "omnibus"
# omnibus-gitlab repo
- gitlab_url = "https://gitlab.com/gitlab-org/#{product}-gitlab/edit/master/doc/#{docs_content_filename}"
+ gitlab_url = "https://gitlab.com/gitlab-org/#{product}-gitlab/blob/master/doc/#{docs_content_filename}"
elsif product == "runner"
# gitlab-runner repo
- gitlab_url = "https://gitlab.com/gitlab-org/gitlab-#{product}/edit/master/docs/#{docs_content_filename}"
+ gitlab_url = "https://gitlab.com/gitlab-org/gitlab-#{product}/blob/master/docs/#{docs_content_filename}"
elsif (product == "ce" or product == "ee")
# gitlab-ce and gitlab-ee repos
- gitlab_url = "https://gitlab.com/gitlab-org/gitlab-#{product}/edit/master/doc/#{docs_content_filename}"
+ gitlab_url = "https://gitlab.com/gitlab-org/gitlab-#{product}/blob/master/doc/#{docs_content_filename}"
else
# gitlab-docs pages
- gitlab_url = "https://gitlab.com/gitlab-com/gitlab-docs/edit/master/#{@item[:content_filename]}"
+ gitlab_url = "https://gitlab.com/gitlab-com/gitlab-docs/blob/master/#{@item[:content_filename]}"
end
result = "<a href='#{gitlab_url}'>Edit this page</a>"