This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
slush-hexo-theme with all
npm packages installed. Try it out:
slush-hexo-theme lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Generate a hexo theme
npm install --global slush npm install --global slush-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
# from the site root cd themes # make a new theme directory mkdir my-theme cd my-theme # generate slush 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
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.
# 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
It's a community project. Want to help?
npm star slush-hexo-theme
Know another template language hexo users need?
# test the development build # it's faster than prd script npm run dev # build before publishing # prd = production build npm run prd # clean up the test site npm 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.