Merge pull request #105 from chickahoona/gh-pages

Added GitLab support for GitLab pages and GitLab Edit Links
This commit is contained in:
Tom Johnson
2017-09-26 07:05:43 -07:00
committed by GitHub
14 changed files with 2731 additions and 567 deletions

View File

@ -16,7 +16,7 @@ If you're using the doc as code approach, you might also consider using the same
There's an Edit me button on each page on this theme. This button allows collaborators to edit the content on Github.
Here's the code for that button on the page.html layout:
Here's the code for that button on the page.html layout for GitHub:
```
@ -27,7 +27,18 @@ Here's the code for that button on the page.html layout:
{% endif %}{% endraw %}
```
In your configuration file, edit the value for `github_editme_path`. For example, you might create a branch called "reviews" on your Github repo. Then you would add something like this in your configuration file for the 'github_editme_path': tomjoht/documentation-theme-jekyll/edit/reviews. Here "tomjoht" is my github account name. The repo name is "documentation-theme-jekyll". The "reviews" name is the branch.
and here for GitLab:
```
{% raw %}{% if site.gitlab_editme_path %}
<a target="_blank" href="https://github.com/{{site.gitlab_editme_path}}/{{page.folder}}{{page.url | append: ".md"}}{% endif %}" class="btn btn-default githubEditButton" role="button"><i class="fa fa-gitlab fa-lg"></i> Edit me</a>
{% endif %}{% endraw %}
```
In your configuration file, edit the value for `github_editme_path` (or for Gitlab: `gitlab_editme_path`). For example, you might create a branch called "reviews" on your Github repo. Then you would add something like this in your configuration file for the 'github_editme_path': tomjoht/documentation-theme-jekyll/edit/reviews. Here "tomjoht" is my github account name. The repo name is "documentation-theme-jekyll". The "reviews" name is the branch.
To suppress this button, comment out the `github_editme_path` in the \_config.yml file.