summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_config.yml.dist2
-rw-r--r--_includes/git-wiki/components/action_btn/page_actions.html6
2 files changed, 7 insertions, 1 deletions
diff --git a/_config.yml.dist b/_config.yml.dist
index a42492f..f031616 100644
--- a/_config.yml.dist
+++ b/_config.yml.dist
@@ -18,6 +18,8 @@ paginate_path: "/blog/page:num"
permalink: /blog/posts/:year/:month/:day/:title:output_ext
# (boolean) Enable/disable download buttons in sidebar
show_downloads: true
+# (string) specify git-wiki host. (github or gitlab)
+service: "gitlab"
# (string) Specify branch rendered by gitpages allowing wiki tool buttons to work
git_branch: "master"
# (string) Url of logo image, it can be full, absolute or relative.
diff --git a/_includes/git-wiki/components/action_btn/page_actions.html b/_includes/git-wiki/components/action_btn/page_actions.html
index 03f1d85..097dc51 100644
--- a/_includes/git-wiki/components/action_btn/page_actions.html
+++ b/_includes/git-wiki/components/action_btn/page_actions.html
@@ -8,14 +8,18 @@
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/new/{{site.git_branch}}?filename={{ site.wiki_folder | default: 'wiki' }}/">Add
new</a></span>
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/edit/{{site.git_branch}}/{{page.path}}">Edit</a></span>
+ {% if site.service == "gitlab" %}
+ <span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/blob/{{site.git_branch}}/{{page.path}}">Delete</a></span>
+ {% else %}
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/delete/{{site.git_branch}}/{{page.path}}">Delete</a></span>
+ {% endif %}
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/commits/{{site.git_branch}}/{{page.path}}">History</a></span>
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/blob/{{site.git_branch}}/{{page.path}}">Source</a></span>
{% if site.blog_feature %}
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/new/{{site.git_branch}}?filename=_posts/">Add
new post</a></span>
{% endif %}
- {% if site.use_prose_io %}
+ {% if site.use_prose_io and site.service == "github" %}
<br>
Prose.io:
<span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/new/{{site.git_branch}}/{{ site.wiki_folder | default: 'wiki' }}">Add