0.7.0 • Published 5 years ago

generator-hexo-theme v0.7.0

Weekly downloads
48
License
-
Repository
github
Last release
5 years ago

generator-hexo-theme

Generate a hexo theme

Template choices:

  • ejs
  • nunjucks
  • pug
  • swig

Style choices:

  • stylus
  • sass
  • scss
  • less
  • css

Other:

  • hexo scripts directory
  • .editorconfig file
  • package.json

Install

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.

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
  1. Check _config.yml in your main blog directory
  • Set theme property to your theme name, activating this theme
  1. Check _config.yml in your theme directory
  • Change menu items if needed
  • Change stylesheet and scripts list if needed
  1. Navigate back to your main blog directory
  2. 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.

# 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

Resources -- What is all this for?

0.7.0

5 years ago

0.6.0

5 years ago

0.5.1

6 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.2

8 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.1

10 years ago