Files
website/theme-overrides/partials/blog_social.html
Jon Lockwood 9d9f9c73c8 feat(blog): added blog capability to posts
Github source:
  url:      https://github.com/4kelly/material-mkdocs-blog
  commit:   a34df0d7c70fd9b327de4b3b8f0ffcd213aa6afa
  branches: (HEAD -> main, origin/main, origin/HEAD)

issue #3 MR !1
2022-01-29 08:43:27 +09:30

17 lines
628 B
HTML

{% if config.extra.social %}
{% set ns = namespace() %}
{% for social in config.extra.social %}
{% set title = social.name %}
{% if not title and "//" in social.link %}
{% set _,url = social.link.split("//") %}
{% set title = url.split("/")[0] %}
{% endif %}
{% if ns.line_break is defined %}
{{ ns.line_break }}
{% endif %}
<a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ title | e }}" class="twemoji">
{% include ".icons/" ~ social.icon ~ ".svg" %}
</a>
{% set ns.line_break = " · " %}
{% endfor %}
{% endif %}