Skip to content

Hexo deployment plugins

Hexo deployment plugins are software packages that extend the functionality of the Hexo static site generator to enable automated publishing to various platforms, such as Git repositories.^[600-developer__blog__hexo-blog__create-blog-Hexo.md]

Deployment to Git

The standard method for deploying a Hexo blog to a Git repository (such as GitHub Pages) uses the hexo-deployer-git plugin^[600-developer__blog__hexo-blog__create-blog-Hexo.md]. To use this plugin, it must be installed via the Node Package Manager (npm)^[600-developer__blog__hexo-blog__create-blog-Hexo.md].

The installation process involves running the specific install command to save the package as a dependency^[600-developer__blog__hexo-blog__create-blog-Hexo.md].

Configuration

Once the plugin is installed, the deployment destination must be configured in the _config.yml file^[600-developer__blog__hexo-blog__create-blog-Hexo.md]. This configuration typically involves defining the repository URL and branch where the static files will be deployed^[600-developer__blog__hexo-blog__create-blog-Hexo.md].

Deployment Workflow

The deployment process is executed using two primary commands in the terminal^[600-developer__blog__hexo-blog__create-blog-Hexo.md]:

  1. Generate: The hexo generate command is run first to compile the static site files^[600-developer__blog__hexo-blog__create-blog-Hexo.md].
  2. Deploy: The hexo deploy command is run to publish the generated files to the configured Git repository^[600-developer__blog__hexo-blog__create-blog-Hexo.md].

These commands can often be chained or scripted within package.json to streamline the workflow^[600-developer__blog__hexo-blog__create-blog-Hexo.md].

Sources

  • 600-developer__blog__hexo-blog__create-blog-Hexo.md