hexo-renderer-marko
Use marko template in Hexo.
Install
$ npm install --save hexo-renderer-markojs
Usage
Create a layout file index.marko
.
class { onCreate() { this.state = { name: 'hello', }; }} Home Hello Word ${data.page.total} ${state.name}
All hexo local variables are in the data property.
$datapage Page specific information and custom variables set in front-matter$datasite Sitewide information$dataconfig Site configuration$datatheme Theme configuration Inherits from site configuration$dataenv Environment variables...
Please read the hexo related documentation: https://hexo.io/docs/variables.html