Hexo | settings

hexo는 프로젝트의 환경설정을 루트(/) 폴더의 _config.yml 파일을 통해서 관리합니다.

각 항목들은 다음과 같습니다.

Root(/)’s _config.yml

Site

1
2
3
4
5
6
7
# Site
title: 타이틀
subtitle: 서브 타이틀
description: 사이트 설명
author: 제공자
language: 언어
timezone: 지역 시간

URL

1
2
3
4
5
6
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: 해당 주소
root: 루트 디렉터리 (서브 디렉터리 지정 가능함)
permalink: :year/:month/:day/:title/ 해당 게시물의 페이지 URL주소 형식
permalink_defaults:

Directory

1
2
3
4
5
6
7
8
9
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

Writing

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Writing
new_post_name: :title.md 새로운 post의 이름
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight: 코드 하이라이트
enable: true
line_number: true
auto_detect: false
tab_replace:
1
2
3
4
5
6
7
8
9
# SideBar
sidebar:
bio: 소개
avatar: /images/avatar.jpg 메인 사진
subtitle:
location: Asia/Seoul 지역
social: 소셜 미디어
github:
twitter:

Theme

1
theme: 테마

Deployment

1
2
3
4
5
# Deployment
deploy:
type: git
repository: https://github.com/sc372/sc372.github.io.git Github Page URL
branch: master

Disqus(aloha theme option)

1
2
#Disqus
disqus_shortname: disqus shortname

/themes 폴더에도 _config.yml 파일이 있는데 적용된 테마에 적용되는 설정파일이다. 테마 설정 파일은 다음에 살펴볼 예정입니다.

현재 적용되어 있는 테마는 aloha 입니다. 테마 마다 지원하는 플러그인이 있는데 구체적인 내용은 themes 를 확인하면 각 테마 마다 document가 있습니다.


자주 포스팅을 하려고 마음을 크게먹었습니다. ;숙제 같을까봐서 마음이 불편할 줄 알았는데 하다보니 재미있고 학습에도 도움이 되는 것 같습니다.

hexo blog yml