https://github.com/tea3/hexo-env
This is the plugin for Hexo that tell development or production.
https://github.com/tea3/hexo-env
Last synced: 8 days ago
JSON representation
This is the plugin for Hexo that tell development or production.
- Host: GitHub
- URL: https://github.com/tea3/hexo-env
- Owner: tea3
- License: mit
- Created: 2016-09-21T12:39:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-21T12:41:33.000Z (almost 10 years ago)
- Last Synced: 2025-09-13T04:08:53.066Z (10 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-env
This is the plugin for [Hexo](https://github.com/hexojs/hexo) that tell development or production.
## Installation
```
npm install hexo-env --save
```
## Usage
``` javascript
var hexo_env = require('hexo-env');
if( hexo_env.env(hexo) == 'development' ){
// Currently, the hexo server is running.
}else if( hexo_env.env(hexo) == 'production'){
// hexo is currently deploying your website.
}
```
If you want to get the current mode on template, use `cache` variable . For details please see the following .
[https://github.com/hexojs/hexo/issues/371](https://github.com/hexojs/hexo/issues/371)
## License
MIT
[Hexo]: http://hexo.io/