Removed platform detection from repository markup

This commit is contained in:
squidfunk 2020-02-01 13:59:12 +01:00
parent 980054a0d1
commit 24c58d8fd4
2 changed files with 1 additions and 27 deletions

View File

@ -2,17 +2,7 @@
This file was automatically generated - do not edit
-#}
{% import "partials/language.html" as lang with context %}
{% set platform = config.repo_url %}
{% if "github" in platform %}
{% set repo_type = "github" %}
{% elif "gitlab" in platform %}
{% set repo_type = "gitlab" %}
{% elif "bitbucket" in platform %}
{% set repo_type = "bitbucket" %}
{% else %}
{% set repo_type = "" %}
{% endif %}
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source">
<div class="md-source__icon">
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
{% include "assets/images/icons/fontawesome/" ~ repo_icon ~ ".svg" %}

View File

@ -22,27 +22,11 @@
{% import "partials/language.html" as lang with context %}
<!--
Check whether the repository is hosted on one of the supported code hosting
platforms (GitHub, GitLab or Bitbucket) to show icon.
-->
{% set platform = config.repo_url %}
{% if "github" in platform %}
{% set repo_type = "github" %}
{% elif "gitlab" in platform %}
{% set repo_type = "gitlab" %}
{% elif "bitbucket" in platform %}
{% set repo_type = "bitbucket" %}
{% else %}
{% set repo_type = "" %}
{% endif %}
<!-- Repository containing source -->
<a
href="{{ config.repo_url }}"
title="{{ lang.t('source.link.title') }}"
class="md-source"
data-md-source="{{ repo_type }}"
>
<div class="md-source__icon">
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}