[ETC] Setting root url in HEXO

ETC

HEXO 블로그를 시작한지 얼마 안됐지만 아직도 세팅은 어렵게만 느껴집니다.
제 블로그를 방문했을때 다른 HEXO 블로그처럼 깔끔하게
https://dev-sawd.github.io/
이렇게 표시되지 않고

https://dev-sawd.github.io/dev-sawd.github.io/
이렇게 Child가 붙었습니다.

사실 사용하는데는 문제 없지만(?) url이라는것이 저렇게 끝나는 것이 아니고
포스트 디테일 페이지로 들어가게 되면 아래와 같이 매우 길어지는것이 문제였습니다.
https://dev-sawd.github.io/dev-sawd.github.io/2018/06/26/Android-Launcher-Icons/

3일동안 찾아다닌 끝에 다른분의 블로그 세팅을 뜯어보고 해결 할 수 있게 되었습니다.

HEXO 정적파일 Root폴더에 있는 _config.yml안에서 설정을 바꿔 해결할 수 있었습니다.
예제를 올리니 여러분의 블로그 설정에 맞게 설정하시길 바랍니다.

_config.yml
1
2
3
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://dev-sawd.github.io
root: /

위의 코드대로 url과 root를 설정하면
로컬작업시 localhost:4000/
디플로이시 https://dev-sawd.github.io/
로 위치가 잡히는 것을 볼 수 있습니다.

그럼 좋은하루되세요!