summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2020-01-08 22:01:08 +0100
committerYehonal <yehonal.azeroth@gmail.com>2020-01-08 22:01:08 +0100
commitb3079927197d733856f44409a80110a38cdfec33 (patch)
tree3406b554ce9f4adf0e7e39126254f58535a3586f
parenta762bbadefc59a9a4c0ad5bb9541b0109d8fec3d (diff)
downloadwiki-b3079927197d733856f44409a80110a38cdfec33.tar.gz
wiki-b3079927197d733856f44409a80110a38cdfec33.tar.bz2
wiki-b3079927197d733856f44409a80110a38cdfec33.zip
defining service automatically
based on metadata hostname
-rw-r--r--_config.yml2
-rw-r--r--_includes/git-wiki/components/action_btn/page_actions.html4
2 files changed, 2 insertions, 4 deletions
diff --git a/_config.yml b/_config.yml
index ac868c7..52a9074 100644
--- a/_config.yml
+++ b/_config.yml
@@ -18,8 +18,6 @@ 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: "github"
# (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 b9151b4..78a4dac 100644
--- a/_includes/git-wiki/components/action_btn/page_actions.html
+++ b/_includes/git-wiki/components/action_btn/page_actions.html
@@ -8,7 +8,7 @@
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/new/{{site.git_branch | escape}}?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 | escape}}/{{page.path | escape}}">Edit</a></span>
- {% if site.service == "gitlab" %}
+ {% if site.hostname == "gitlab.com" %}
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/blob/{{site.git_branch | escape}}/{{page.path | escape}}">Delete</a></span>
{% else %}
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/delete/{{site.git_branch | escape}}/{{page.path | escape}}">Delete</a></span>
@@ -19,7 +19,7 @@
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/new/{{site.git_branch | escape}}?filename=_posts/">Add
new post</a></span>
{% endif %}
- {% if site.use_prose_io and site.service == "github" %}
+ {% if site.use_prose_io and site.hostname == "github.com" %}
<br>
Prose.io:
<span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/new/{{site.git_branch | escape}}/{{ site.wiki_folder | default: 'wiki' }}">Add