slush-hexo-theme0.1.2 • Public • Published
Generate a hexo theme
- hexo scripts
- bower: .bowerrc, bower.json
- npm: package.json
npm install --global slushnpm install --global slush-hexo-theme
How to use it
If you don't have a site yet create one with
hexo init hexo-cli.
mkdir my-sitecd my-sitehexo init
Navigate to the directory you want to place the theme project in (most likely
# from the site rootcd themes# make a new theme directorymkdir my-themecd my-theme# generateslush hexo-theme
It will not automatically overwrite an existing file. Overwrites are confirmed with the user.
_config.ymlin your main blog directory
themeproperty to your theme name, activating this theme
_config.ymlin your theme directory
- Change menu items if needed
- Change stylesheet and scripts list if needed
- Navigate to your main blog directory
hexo server --debug
It might be necessary to goto the blog directory and install a specific renderer for the template language you have chosen. Swig are built into Hexo.
# templatesnpm install hexo-renderer-ejsnpm install hexo-renderer-njksnpm install hexo-render-pug# stylesnpm install hexo-renderer-stylusnpm install hexo-renderer-lessnpm install hexo-renderer-sass
It's a community project. Want to help?
- Fix a bug
- GitHub star ⭐
npm star slush-hexo-theme
- Do we need to implement any helpers? https://hexo.io/docs/helpers.html
Know another template language hexo users need?
- Copy an existing template directory
- Port it to the new language
- Create pull request
# test the development build# it's faster than prd scriptnpm run dev# build before publishing# prd = production buildnpm run prd# clean up the test sitenpm run clean
npm run prd does everything needed:
If you want to add a template language please copy one and port it so it keeps roughly the same structure.