https://github.com/tcrowe/generator-hexo-theme
Generate a hexo theme: ejs, pug, swig, nunjucks | Moved to https://tcrowe.commons.host/contact
https://github.com/tcrowe/generator-hexo-theme
ejs hexo hexo-theme jade nunjucks swig theme yeoman
Last synced: 4 months ago
JSON representation
Generate a hexo theme: ejs, pug, swig, nunjucks | Moved to https://tcrowe.commons.host/contact
- Host: GitHub
- URL: https://github.com/tcrowe/generator-hexo-theme
- Owner: tcrowe
- Archived: true
- Created: 2014-05-13T07:05:44.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T21:48:34.000Z (over 5 years ago)
- Last Synced: 2024-11-14T17:13:49.226Z (6 months ago)
- Topics: ejs, hexo, hexo-theme, jade, nunjucks, swig, theme, yeoman
- Language: HTML
- Homepage:
- Size: 106 KB
- Stars: 126
- Watchers: 7
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# generator-hexo-theme
Generate a hexo theme
Template choices:
+ ejs
+ nunjucks
+ pug
+ swigStyle choices:
+ stylus
+ sass
+ scss
+ less
+ cssOther:
+ hexo scripts directory
+ .editorconfig file
+ package.json## Install
```sh
npm install --global yo
npm install --global generator-hexo-theme
```## Use
If you don't have a site yet create one with `hexo init` [hexo-cli](https://github.com/hexojs/hexo-cli).
```sh
mkdir my-site
cd my-site
hexo init
```Navigate to the directory you want to place the theme project in (most likely `themes/`).
```sh
# from the site root
cd themes# make a new theme directory
mkdir my-theme
cd my-theme# generate
yo hexo-theme
```1. Check `_config.yml` in your **main blog directory**
* Set `theme` property to your theme name, activating this theme
2. Check `_config.yml` in your **theme directory**
* Change menu items if needed
* Change stylesheet and scripts list if needed
3. Navigate back to your **main blog directory**
4. `hexo server --debug`## Hexo renderers
It might be necessary to goto the blog root and install a specific renderer for the template language you have chosen. Swig is built into Hexo at the current version.
```sh
# templates
npm install hexo-renderer-ejs
npm install hexo-renderer-njks
npm install hexo-render-pug# styles
npm install hexo-renderer-stylus
npm install hexo-renderer-less
npm install hexo-renderer-sass
```## Thank you
+ [moosoul](https://github.com/moosoul)
+ [jonashao](https://github.com/jonashao)## Resources -- What is all this for?
+ hexo static site generator [hexo.io](https://hexo.io)
+ Yeoman scaffolding tool [yeoman.io](https://yeoman.io)
+ EditorConfig [editorconfig.org](http://editorconfig.org)