added more clarification with github button
This commit is contained in:
parent
8dbe2a2304
commit
5a874e3c93
@ -16,8 +16,8 @@ layout: default
|
||||
{% if site.github_editme_path %}
|
||||
|
||||
<a target="_blank" href="https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{{content}}
|
||||
|
||||
<div class="tags">
|
||||
|
@ -16,12 +16,34 @@ There's an Edit me button on each page on this theme. This button allows collabo
|
||||
|
||||
Here's the code for that button on the page.html layout:
|
||||
|
||||
{% raw %}
|
||||
```
|
||||
{% if site.github_editme_path %}
|
||||
<a href="https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}" class="btn btn-default " role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
|
||||
{% endif %}
|
||||
{% if site.github_editme_path %}
|
||||
<a href="https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}" class="btn btn-default " role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
|
||||
{% endif %}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
You could also make it so the Github button appears only when you're working in a development environment.
|
||||
|
||||
{% raw %}
|
||||
```
|
||||
{% if jekyll.environment == "development" %}
|
||||
{% if site.github_editme_path %}
|
||||
<a target="_blank" href="https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
|
||||
{% endif %}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
To activate the development environment, add the [environment flag](http://jekyllrb.com/docs/configuration/) in your build command:
|
||||
|
||||
{% raw %}
|
||||
```
|
||||
JEKYLL_ENV=development jekyll serve
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
The default environment is production.
|
||||
|
||||
## Add reviewers as collaborators
|
||||
|
||||
@ -29,4 +51,6 @@ If you want people to collaborate on your project so that their edits get commit
|
||||
|
||||
If you don't want to allow anyone to commit to your Github branch, don't add the reviewers as collaborators. When someone makes an edit, Github will fork the theme. The person's edit then will appear as a pull request to your repo. You can then choose to merge the change indicated in the pull or not.
|
||||
|
||||
{{site.data.alerts.note}} When you process pull requests, you have to accept everything or nothing. You can't pick and choose which changes you'll merge. Therefore you'll probably want to edit the branch you're planning to merge or ask the contributor to make some changes to the fork before processing the pull request.{{site.data.alerts.end}}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user