From b3079927197d733856f44409a80110a38cdfec33 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Wed, 8 Jan 2020 22:01:08 +0100 Subject: defining service automatically based on metadata hostname --- _config.yml | 2 -- _includes/git-wiki/components/action_btn/page_actions.html | 4 ++-- 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 @@ Add new Edit - {% if site.service == "gitlab" %} + {% if site.hostname == "gitlab.com" %} Delete {% else %} Delete @@ -19,7 +19,7 @@ Add new post {% endif %} - {% if site.use_prose_io and site.service == "github" %} + {% if site.use_prose_io and site.hostname == "github.com" %}
Prose.io: Add -- cgit