반응형

1. icarusn 모듈 설치

먼저 로컬에 있는 blog 소스가 있는 폴더 안에서 git submodule 을 추가해준다.

내가 설치하려고 하는 테마는 icarus 라는 테마인데 설치 방법은 여러가지가 있다.

Document를 보니 git submodule 을 추가하는 방법도 있고 npm 으로 설치하는방법도 있다.

 

git submodule add https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus

 

이렇게 하면 blog 하위에 themes 폴더 안에 icarus 라는 항목이 생긴다.

 

또는

 

npm install -S hexo-theme-icarus

 

나는 submodule 을 추가 하는 방법을 사용했다.

 

2. 설정파일 변경

_config.yml 파일을 수정해준다.

 

theme: icarus

 

3. 반영 확인

설치 완료 후 hexo server 명령어를 통해서 로컬에서 기동 시켜보면 테마가 변경 된 것을 확인 할 수 있다.

 

4. 에러 발생시?

혹시라도 아래와 같이 dependencies 에러가 난다면 에러난 항목들을 설치해 주면 된다.

아래 bold 처리한 부분을 설치해 주면 된다.

 

INFO  === Checking package dependencies ===
ERROR Package bulma-stylus is not installed.
ERROR Package hexo-renderer-inferno is not installed.
ERROR Package hexo-component-inferno is not installed.
ERROR Package inferno is not installed.
ERROR Package inferno-create-element is not installed.
ERROR Please install the missing dependencies your Hexo site root directory:
ERROR npm install --save bulma-stylus@0.8.0 hexo-renderer-inferno@^0.1.3 hexo-component-inferno@^0.10.1 inferno@^7.3.3 inferno-create-element@^7.3.3
ERROR or:
ERROR yarn add bulma-stylus@0.8.0 hexo-renderer-inferno@^0.1.3 hexo-component-inferno@^0.10.1 inferno@^7.3.3 inferno-create-element@^7.3.3

 

5. git submodule 관련 사항

- 설치 잘못해서 재 설치시 나왔던 에러

git 레파지토리에 submodule을 추가했다가 제거한 후 다시 추가 하려고 하니 다음과 같은 에러가 발생했다.

 

A git directory for 'themes/icarus' is found locally with remote(s):

 

그런데 분명한것은 현재 로컬에는 저 폴더가 없는 상태이다. 하짐나  .git/modules 하위에 themes/icarus 라는 폴더가 남아있었다. 그래서 그 폴더를 삭제한 후 submodule  을 추가 하니 정상적으로 동작을 했다.

 

- 다른 곳에서 submodule 을 포함한 소스 내려 받기

 

최초 내려 받기 : git clone --recursive git_url

이미 내려받는 곳에서 submodule 만 받기 : git submodule update --init --recursive

 

 

참고 사이트 

github.com/ppoffice/hexo-theme-icarus

blog.zhangruipeng.me/hexo-theme-icarus/uncategorized/getting-started-with-icarus/

www.vogella.com/tutorials/GitSubmodules/article.html

728x90
반응형

+ Recent posts