Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Minimalist Hexo blog theme with vanilla JS, Less styling, article expiry warnings, reading progress, and multiple comment systems.
Snippet is a minimalist open-source Hexo blog theme that replaces jQuery with vanilla JavaScript and packs in a series of practical blog features out of the box. Developed by shenliyang, it targets Hexo 3.0 and above, with explicit support for hexo@7+. The theme renders a responsive blog with homepage, post pages, archives, categories, tags, local search, and a configurable sidebar, and it is released under the MIT License.
Snippet is a Hexo theme designed to stay lightweight and easy to configure, requiring only the standard Hexo environment — Node.js, Git, and Hexo itself. It uses the ejs template engine and the Less CSS preprocessor, so installing hexo-renderer-ejs and hexo-renderer-less is mandatory. The theme's source lives at github.com/shenliyang/hexo-theme-snippet, where it receives ongoing maintenance and accepts pull requests. Its output is a static blog generated by hexo clean && hexo g, which can be previewed with hexo s -p 4000 and deployed with hexo d.
Snippet is aimed at Hexo bloggers who want a clean, fast theme without heavy JavaScript dependencies. It suits developers who are comfortable editing _config.yml and want to customize features like the tag cloud, sidebar widgets, and excerpt length in YAML. The official documentation and GitHub issues are largely in Chinese, so it is especially approachable for Chinese-speaking users, though the config comments include English descriptions. It also appeals to bloggers who automate publishing through Travis CI and need email or DingTalk notifications on deployment outcomes.
The theme follows a standard Hexo workflow: install the theme in the themes/hexo-theme-snippet directory, install required plugins with npm i hexo-renderer-ejs hexo-renderer-less hexo-deployer-git -S, then configure _config.yml in the theme folder. For building, you can use the optional Gulp pipeline by copying the theme's package.json and creating a gulpfile that requires the theme's gulpfile, then run gulp before hexo clean && hexo g. Updates are handled with git pull inside the theme directory.
Yes. hexo-renderer-ejs, hexo-renderer-less, and hexo-deployer-git are mandatory for rendering and deploying. Local search additionally requires [email protected]; without it, content.json is missing and the search box will not work.
Put an img value in the post's front-matter. The theme loads thumbnails in this order: the front-matter img field, the first image found inside the article, a random image from the defaultImgs list, and finally a no-image layout.
That is expected behavior. The theme does not create tag or category pages by default; you must create them yourself with hexo new page tags and hexo new page categories.
Set the site language in your Hexo root _config.yml with language: zh-CN. The theme picks up this setting; without it, widget titles default to English.
Yes, pagination is built in and configured in your Hexo root _config.yml. The per_page parameter controls posts per page (10 by default, 0 disables pagination) and pagination_dir sets the pagination directory, defaulting to page.
