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>2019-05-21 02:23:50 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2019-05-21 02:23:50 +0300
commitb09ee838e77695c5b577271666a490e2412b0afd (patch)
tree1d514109c5523ea169d90cecee8ee2e97a34ef88 /README.md
parent09387629a7bab10f5b4085ea3a45b426e67c6de5 (diff)
Add option to link to Web IDE to edit files
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 80ca533d..84e906a2 100644
--- a/README.md
+++ b/README.md
@@ -346,6 +346,17 @@ The links pointing to the files should be similar to:
Nanoc will then build and render those links correctly according with what's
defined in [`Rules`](/Rules).
+## Linking to source files
+
+A helper called [`edit_on_gitlab`](/lib/helpers/edit_on_gitlab.rb) can be used
+to link to a page's source file. We can link to both the simple editor and the
+web IDE. Here's how you can use it in a Nanoc layout:
+
+- Default editor: `<a href="<%= edit_on_gitlab(@item, editor: :simple) %>">Simple editor</a>`
+- Web IDE: `<a href="<%= edit_on_gitlab(@item, editor: :webide) %>">Web IDE</a>`
+
+If you don't specify `editor:`, the simple one is used by default.
+
## Review Apps for documentation merge requests
If you are contributing to GitLab docs read how to [create a Review App with each