Hexo | theme settings

hexo에 자신이 원하는 theme를 설치 하면 /themes 폴더 안에 테마 폴더가 생선됩니다. 폴더로 진입하면 설전 파일인 _config.yml이 있습니다. 이 파일은 루트(/) 의 _config.yml 파일과 이름은 같지만 설정 내용은 다릅니다. 저는 처음에 좀 헷갈려서 이리저리 헤맸어요. 저는 aloha 테마를 기준으로 설명하겠습니다. 테마별로 설정 내용이 상이할 수 있습니다.

Theme’s(aloha) _confoig.yml

Language

1
2
3
# html languages /languages 폴더를 의미합니다. 원하는 언어를 설정하세요.
language:
- en

Theme

1
2
3
# aloha has different themes, default one is simple,
# you could change it with simple, xx
theme: simple 테마안에서도 다양한 테마를 제공합니다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# main menu navigation 네비게이션 설정 입니다.
# icon name see http://semantic-ui.com/elements/icon.html
menu:
Home:
name: home
value: /index.html
icon: home
# Rss:
# name: rss
# value: /atom.xml
# icon: rss
# About:
# name: about
# value: https://about.me/sc372
# icon: user

Favicon

1
2
# Miscelaneous
favicon: /favicon.ico 원하는 파비콘을 /themes/source 폴더에서 지정하세요.

Stylesheet

1
2
3
4
5
6
# stylesheets loaded in the <head> 스타일 시트를 정의 합니다.
stylesheets:
- local/css/aloha.css
#- local/css/semantic-ui/2.2.4/semantic.min.css
- cdn/semantic-ui/2.2.4/semantic.min.css
- cdn/magnific-popup.js/1.1.0/magnific-popup.min.css

Script

1
2
3
4
5
6
7
8
9
# scripts loaded in the end of the body 스크립트를 정의 합니다.
scripts:
- cdn/jquery/3.1.0/jquery.min.js
- cdn/semantic-ui/2.2.4/semantic.min.js
- cdn/algoliasearch/3.18.1/algoliasearch.min.js
- cdn/algoliasearch-helper-js/2.13.0/algoliasearch.helper.min.js
#- cdn/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js
- local/js/semantic-ui-algolia.js
- local/js/aloha-events.js

이 부분을 보면서 브라우저에 랜더링되는 내용을 조금이나마 확인해볼 수 있었습니다. _config.yml 파일을 통해서 직접 코드를 다루지 않아도 쉽게 이용할 수 있는게 hexo의 장점인데요. 직접 코드를 수정하거나 하려면 이 내용이 나침반이 되지 않을까 합니다.

  • 참고 : themes
  • 혹시 잘못된 내용이 있으면 알려주시면 감사하겠습니다.
hexo blog