Hexo로 블로그를 써요.

TEMPLATE BLOG


직접 사용하는template도github에 준비되어 있습니다.
참고가 됐으면 좋겠습니다.
CODE
BLOG URL
자신의 리포를 사용할 때 변경해야 할 부분은
1. Deploy Setting
2. Github Pages Setting
3. Set Github Page URL

이른바 Hexo

  • Node.js 정적 웹 사이트 생성기
  • markdown 포맷으로 쓴 글을 HTML 포맷
  • 으로 최종 출력

    node.js

    Node.js제 정적 사이트 생성기이기 때문에 설치해야 한다Node.js

    nvm

    nvm에 설치Node.js

    Install

    npm install -g hexo-cli
    

    Commands

    $ hexo init [folder]
    $ hexo server
    

    Deploy to Github


    설치hexo-deployer-git
    $ npm install hexo-deployer-git --save
    

    Deploy Setting


    설정_config.yaml의 deploy 설정
    PAges에서 branch 설정
    _config.yaml
    deploy:
      type: git
      repo: <repository ssh> # [email protected]:<user>/<repository name>.git
      branch: pages
    

    Deploy Command

    hexo clean && hexo deploy
    

    Github Pages Setting


    Branch 선택 페이지
    루트 선택

    Set Github Page URL


    _config.yaml
    # URL
    ## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
    url: https://username.github.io/project
    

    Github Actions


    push main branch 때마다 deploy를 페이지 branch로 자동 이동
    추가.github/workflows/pages.ymldeploying branch 설정 페이지
    .github/workflows/pages.yml
    publish_branch: pages # deploying branch
    

    좋은 웹페이지 즐겨찾기