소스 검색

custom favicon (#63)

Muhammad Rifqi Fatchurrahman Putra Danar 4 년 전
부모
커밋
61a9d7aea0
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      exampleSite/config.yaml
  2. 1 1
      layouts/partials/header.html

+ 1 - 0
exampleSite/config.yaml

@@ -39,6 +39,7 @@ params:
   logo:
     main: /assets/images/main-logo.png
     inverted: /assets/images/inverted-logo.png
+    favicon: /assets/images/favicon.png
 
   # GitHub repo URL of your site
   gitRepo: https://github.com/hossainemruz/toha-example-site

+ 1 - 1
layouts/partials/header.html

@@ -13,7 +13,7 @@
 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" />
 
 <!--================= fab-icon =========================-->
-<link rel="icon" type="image/png" href="/assets/images/favicon.png" />
+<link rel="icon" type="image/png" href="{{ .Site.Params.logo.favicon | default "/assets/images/favicon.png"}}" />
 
 <!--================= custom style overrides =========================-->
 <link rel="stylesheet" href="/assets/css/style.css" />