npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

slush-hexo-theme

v0.1.2

Published

generate a hexo theme project

Downloads

9

Readme

slush-hexo-theme

Generate a hexo theme

Yeoman version available too

Template choices:

  • ejs
  • nunjucks
  • pug
  • swig

Style choices:

  • stylus
  • sass
  • scss
  • less
  • css

Other:

  • hexo scripts
  • bower: .bowerrc, bower.json
  • npm: package.json
  • .gitignore
  • .editorconfig

Install globally

npm install --global slush
npm 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-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
slush hexo-theme

It will not automatically overwrite an existing file. Overwrites are confirmed with the user.

  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 to your main blog directory
  2. hexo server --debug

Hexo renderers

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

Help!


Contribute

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?

  1. Fork
  2. Copy an existing template directory
  3. Port it to the new language
  4. Test
  5. Create pull request

Development

# 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:

  • clean
  • link
  • test

If you want to add a template language please copy one and port it so it keeps roughly the same structure.


Thank you contributors

Resources

  • Theme docs https://hexo.io/docs/themes.html
  • Submit your theme https://github.com/hexojs/hexo-theme-unit-test
  • Slush docs http://slushjs.github.io