From a18eb4f98257a6acac9fb2d22d2b6c3218fbd3f1 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 16 Oct 2016 18:22:07 +0200 Subject: [PATCH] Add extra.repo_type config option to override link parser --- material/partials/source.html | 17 +++++++++-------- src/partials/source.html | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/material/partials/source.html b/material/partials/source.html index c0cf1b8e7..ff4a54888 100644 --- a/material/partials/source.html +++ b/material/partials/source.html @@ -1,13 +1,14 @@ -{% if "github." in repo_url %} - {% set platform = "md-source--github" %} -{% elif "gitlab." in repo_url %} - {% set platform = "md-source--gitlab" %} -{% elif "bitbucket." in repo_url %} - {% set platform = "md-source--bitbucket" %} +{% set platform = config.extra.repo_icon or repo_url %} +{% if "github" in platform %} + {% set repo_icon = "md-source--github" %} +{% elif "gitlab" in platform %} + {% set repo_icon = "md-source--gitlab" %} +{% elif "bitbucket" in platform %} + {% set repo_icon = "md-source--bitbucket" %} {% else %} - {% set platform = "" %} + {% set repo_icon = "" %} {% endif %} - +
{{ repo_name }}