hexo theme

官网提供的模板

模板地址 hexo themes,点击图片可以预览效果,点击文字可以进入 git
下面列举示例,引用 hexo-theme-bootstrap-blog

安装主题必须在 hexo 2.4 或以上

  1. 将主题拉到本地:

    1
    $ git clone https://github.com/cgmartin/hexo-theme-bootstrap-blog.git themes/bootstrap-blog
  2. 安装 hexo-tag-bootstrap for more Bootstrap tags (textcolors, buttons, labels, badges, etc.):

    1
    $ npm install hexo-tag-bootstrap --save
  3. 安装 hexo-tag-fontawesome for placing Font Awesome icons in your Markdown:

    1
    $ npm install hexo-tag-fontawesome --save
  4. 修改脚本引用
    因 google 国内无法访问,打开 themes/bootstrap-blog/layout/_partial/inline-scripts.ejs,将 jQuery 和 bootstrap 引用修改:

    1
    2
    3
    <script src="https://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  5. 配置 _config.yml 的 theme 配置

    1
    2
    3
    4
    theme: hexo-theme-xups
    # 更新 git
    $ cd themes/bootstrap-blog
    $ git pull