diff options
| author | Yehonal <yehonal.azeroth@gmail.com> | 2019-04-24 14:39:50 +0200 |
|---|---|---|
| committer | Yehonal <yehonal.azeroth@gmail.com> | 2019-04-24 14:53:41 +0200 |
| commit | 35c737fc1436470b5e62f9f5cd6bb1d6878dfc6c (patch) | |
| tree | 404a2dbf126a2db30f5d815570b96aa5d20f6d3a | |
| parent | 1bedc132d59d7362d15daf4ef09efd7087760c97 (diff) | |
| download | wiki-35c737fc1436470b5e62f9f5cd6bb1d6878dfc6c.tar.gz wiki-35c737fc1436470b5e62f9f5cd6bb1d6878dfc6c.tar.bz2 wiki-35c737fc1436470b5e62f9f5cd6bb1d6878dfc6c.zip | |
Implemented service config and fixed action buttons
| -rw-r--r-- | _config.yml.dist | 2 | ||||
| -rw-r--r-- | _includes/git-wiki/components/action_btn/page_actions.html | 6 |
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 |
