A hexo plugin for using variable in configuration.
for example, you can use environment variable in your _config.yml
# install locally (recommended)
npm install hexo-dynamic-config --saveOr installing with yarn? yarn add hexo-dynamic-config
| key | description |
|---|---|
| env | environment variable process.env |
| hexo | hexo instance |
You can create a .env file in the root of your project:
FTP_SECRET=YOURFTPSECRETFill your project configuration _config.yml like this:
deploy:
type: ftp
ftp_secret: ${env.FTP_SECRET}Fill your project configuration _config.yml like this:
title: This is your blog title
subtitle: ${hexo.config.title} - Share good articles.. Or like:
title: This is your blog title
tags:
- env
- linux
- server
- java
- nginx
description: ${title} - share ${hexo.config.tags.join(',')}