A fast, simple & powerful blog framework, powered by Node.js. Here is the template of it.
For example, if you use GitHub Page, set url as https://username.github.io/projectname
:
url: https://lopins.github.io/hexo-template
if your project name is username
or username.github.io
, just remove it at the end of _config.yml
:
root: /hexo-template
-
pull theme into
themes/
and update it(Choose one of the following.).git submodule add git@github.com:litten/hexo-theme-yilia.git themes/yilia && git submodule update --init --recursive
git clone git@github.com:litten/hexo-theme-yilia.git themes/yilia && rm -rf themes/yilia/.git
-
update
theme: yilia
and configure other fields in_config.yml
-
configure the theme in
_config.yilia.yml
or intothemes/yilia
to configure the theme in_config.yml
-
(Optional) If the theme has dependent plugins, you also need to run
npm install && npm install hexo-xxx hexo-yyy hexo-zzz --save
-
Run
git add . && git commit -m ':wrench: docs(themes): Add or update configuration files' && git push origin main
to commit the changes.
-
Install
Click "Use this template" -> "Create a new repository"
-
Set up
Set up and enable GitHub Pages service
-
Publish
Publish an article on the "hexo branch" of Github.
# Add Submodule - Upadte Submodule
git submodule add git@github.com:litten/hexo-theme-yilia.git themes/yilia
git submodule update --init --recursive
# Delete Submodule
git submodule deinit -f themes/yilia
rm -rf .git/modules/themes/yilia
rm -rf themes/yilia
git config --remove-section submodule.themes/yilia
git config -f .gitmodules --remove-section submodule.themes/yilia
git rm --cached themes/yilia
git add . && git commit -m 'Update .gitmodules before removing submodule'
# Display Submodule - Pull Submodule - Sync Submodule
git submodule status
git submodule foreach git pull origin main
git submodule sync
If you meet the problem like remote: Permission to xxx denied to github-actions[bot].
When you push your changes, you need to give the permission to the github-actions[bot]
in your repo's.
By following the steps below: Settings -> Actions -> General -> Workflow permissions -> Read and write permissions -> Save
.