diff --git a/assets/data/social.yml b/assets/data/social.yml index 8c99b636c..eadab4647 100644 --- a/assets/data/social.yml +++ b/assets/data/social.yml @@ -597,7 +597,7 @@ bilibili: Prefix: https://space.bilibili.com/ Title: bilibili Icon: - Simpleicons: bilibili + Src: svg/icons/bilibili.svg # 063: ORCID orcid: diff --git a/layouts/partials/plugin/icon.html b/layouts/partials/plugin/icon.html index cc62d0c49..11392b20f 100644 --- a/layouts/partials/plugin/icon.html +++ b/layouts/partials/plugin/icon.html @@ -2,10 +2,13 @@ {{- partial "plugin/fontawesome.html" . -}} {{- else -}} {{- with .Simpleicons -}} - {{ partial "plugin/simpleicons.html" . }} +{{ partial "plugin/simpleicons.html" . }} {{- else -}} -{{- with .Class -}} - {{- errorf "Deprecated %v" . -}} +{{- with .Src -}} +{{- $resource := resources.Get . -}} +{{ if not $resource }} +{{- errorf "Icon does not exist %v" . -}} {{- end -}} -{{- end -}} -{{- end }} \ No newline at end of file +{{- $resource := $resource.Content -}} +{{- $resource | replaceRE `