Categories와 동일한 방법으로 tags 기능을 추가했다.
1. Post 작성
Front Matter에 tags를 작성한다.
// 1개의 태그를 작성할 경우 --- layout: post title: Korea categories: trip tags: weekend --- // 2개 이상의 태그를 작성할 경우 --- layout: post title: Seoul categories: [trip, personal] tags: [weekend, river] ---
2. tags.html
최상위 폴더 안에 tags.html을 추가한다.
. +-- _includes | --- head.html | --- sidebar.html +-- _layouts | --- default.html | --- page.html | --- post.html +-- _posts +-- css +-- public | +-- css | | --- lanyon.css | | --- poole.css | | --- syntax.css | --- favicon.ico --- config.yml --- index.html --- categories.html --- tags.html
아래의 코드를 tags.html에 작성한다.
3. CSS 추가
tag를 소문자로 출력하도록 lanyon.css 파일에 tag-group class를 작성한다.
.tag-group {
text-transform: lowercase;
}