Hexo is a fast, simple and powerful blog framework. You write posts in Markdown (or other markup languages) and Hexo generates static files with a beautiful theme in seconds.
Installation
Prerequisites
Git
Node.js
NPM or YARN
Mac
1
brew install hexo
Majaro
1
yay hexo
Windows
1
yarn global add hexo-cli
Initialization
Once Hexo is installed, run the following commands to initialize Hexo in the target <folder>.
title: Danger If you leave algolia required settings blank, your website will be stuck on loading. You can skip this step if search reature is not necessary for you.
# hexo-hide-posts hide_posts: enable:true # Change the filter name to fit your need filter:hidden # Generators which you want to expose all posts (include hidden ones) to. # Common generators: index, tag, category, archive, sitemap, feed, etc. public_generators: [] # Add "noindex" meta tag to prevent hidden posts from being indexed by search engines noindex:true
Optional token value to authenticate with the repo. Prefix with $ to read token from environment variable
Warning
While this plugin can parse authentication token from the config, only use this method if you are sure the config will not be committed, including to a private repo. A more secure approach is to add it to the CI as an environment variable, then simply add the name of the environment variable to this plugin's config (e.g. $GITHUB_TOKEN).
1 2
title: Danger Type PAT in `token` does not work now!
Import public key and private key
Warning
Make sure your public/private keys are already generated before starting this guide.
Instead of PAT, hexo-deployer-git works greate with public/private keys.
# Starter pipeline # Start with a minimal pipeline that you can customize to build and deploy your code. # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml
trigger: -main
pool: vmImage:ubuntu-latest# hexo-cli does not work on Windows.