Hexo로 블로그를 써요.
2964 단어 GitHubActionsgithub-pagesHexo
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.yamldeploy:
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.ymlpublish_branch: pages # deploying branch
Reference
이 문제에 관하여(Hexo로 블로그를 써요.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/z6wdc/items/eda8f68a2d2b53b5fd2e
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
npm install -g hexo-cli
$ 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.yamldeploy:
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.ymlpublish_branch: pages # deploying branch
Reference
이 문제에 관하여(Hexo로 블로그를 써요.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/z6wdc/items/eda8f68a2d2b53b5fd2e
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
$ npm install hexo-deployer-git --save
deploy:
type: git
repo: <repository ssh> # [email protected]:<user>/<repository name>.git
branch: pages
hexo clean && hexo deploy
# 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
push main branch 때마다 deploy를 페이지 branch로 자동 이동
추가.github/workflows/pages.yml
deploying branch
설정 페이지.github/workflows/pages.yml
publish_branch: pages # deploying branch
Reference
이 문제에 관하여(Hexo로 블로그를 써요.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/z6wdc/items/eda8f68a2d2b53b5fd2e텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)