소스 검색

Allow custom icons to be set per tag

Create a file for each tag that needs a custom icon eg:

/content/tags/favourites/_index.md

containing:

---
fa_icon: fa-heart
title: Favourites
---
master
Adrian Short 6 년 전
부모
커밋
8b725e412e
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. +7
    -1
      layouts/_default/list.html

+ 7
- 1
layouts/_default/list.html 파일 보기

@@ -1,5 +1,11 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ $.Scratch.Set "fa_icon" "fa-tag" }}

{{ if isset .Params "fa_icon" }}
{{ $.Scratch.Set "fa_icon" .Params.fa_icon }}
{{ end }}

<h1><i class="fa {{ $.Scratch.Get "fa_icon" }}"></i>{{ .Title }}</h1>
{{ range .Paginator.Pages }}
{{ .Render "li" }}
{{ end }}


불러오는 중...
취소
저장