此主题参考Bear的阅读体验而制作。
This theme is inspired by Bear which is awesome!
- Download from GitHub
$ cd your-hexo-site
$ git clone https://github.com/gary-Shen/hexo-theme-bear themes/bear- Set the
themefield in your site_config.ymltobear
theme: bear- ❤️ Install dependencies.
The template is written in pug. So you need to installhexo-render-pug.
$ npm i hexo-render-pug
# Install your all dependencies if you didn't do this before.
$ npm i
The theme now uses Hexo's built-in i18n system. Set the language field in your site-level _config.yml (e.g. language: en or language: zh-CN) and Hexo will pick the matching file from themes/bear/languages/. English (en), Simplified Chinese (zh-CN), Traditional Chinese (zh-TW), and Japanese (ja) are bundled. To add another language, duplicate languages/en.yml, translate the strings, and name it after the new locale code.
menukeys are looked up withmenu.<key>and fall back to the key itself. You can still supply a simple path (menu.home: /), or use an object when you need more control:menu: home: / about: path: /about i18n: menu.about # optional explicit translation key label: en: About zh-CN: 关于 target: _blank # optional target attribute
date_format, and any custommenulabels accept either a string or an object keyed by locale codes. The theme picks the best match based on the current page language:date_format: en: YYYY-MM-DD zh-CN: YYYY年MM月DD日 zh-TW: YYYY年MM月DD日 ja: YYYY年MM月DD日
cd themes/bear
git pull
