Generate a hexo theme: ejs, pug, swig, nunjucks | Moved to https://tcrowe.commons.host/contact
Generate a hexo theme
Template choices:
Style choices:
Other:
npm install --global yo
npm install --global generator-hexo-theme
If you don't have a site yet create one with hexo init
hexo-cli.
mkdir my-site
cd my-site
hexo init
Navigate to the directory you want to place the theme project in (most likely themes/
).
# from the site root
cd themes
# make a new theme directory
mkdir my-theme
cd my-theme
# generate
yo hexo-theme
_config.yml
in your main blog directory
theme
property to your theme name, activating this theme_config.yml
in your theme directory
hexo server --debug
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.
# 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