gitbook-plugin-lovot-theme

1.0.1 • Public • Published

Gitbook 主题插件

效果

主题

水印

打赏

使用

添加下面配置到 book.jsonbook.js文件中:

// book.js
module.exports = {
  plugins: [ "lovot-theme" ],
  pluginsConfig: {
    "lovot-theme": {
      color: "#2096FF", // 主题色
      favicon: "static/favicon.ico", // favicon图标
      logo: "static/logo.png", // 顶部左侧图标
      appleTouchIconPrecomposed152: "static/apple.png", // apple图标
      copyrightLogo: "assets/copyright.png",  // 底部水印LOGO
      forbidCopy: true, // 页面是否禁止复制
      "search-placeholder": "众里寻他千百度", // 搜索框默认文本
      "book-summary-title": "目录", // 目录标题
      "book-anchor-title": "本篇章节:", // 本章目录标题
      "hide-elements": [ ".summary .gitbook-link", ".summary .divider" ], // 需要隐藏的标签
      copyright: {
        author: "LO.v.OT"  // 底部版权展示的作者名
      }
    }
  },
  variables: {
    lovotTheme: {
      // 顶部导航栏配置
      nav: [
        {
          target: '_blank', // 跳转方式: 打开新页面
          url: 'https://www.bilibili.com/', // 跳转页面
          name: 'B站', // 导航名称
        },
        {
          target: '_blank', // 跳转方式: 打开新页面
          url: 'https://app.yinxiang.com/', // 跳转页面
          name: '印象笔记', // 导航名称
        },
        {
          target: '_blank', // 跳转方式: 打开新页面
          url: 'https://gitee.com/', // 跳转页面
          name: 'Gitee', // 导航名称
        },
      ],
      // 底部打赏配置
      footer: {
        donate: {
          button: "赞赏", // 打赏按钮
          avatar: "头像地址", // 头像地址
          nickname: "坐着", // 昵称
          message: "随意打赏,但不要超过一顿早餐钱!☕️", // 打赏消息文本
          text: "『 赠人玫瑰 🌹 手有余香 』", // 打赏话语
          wxpay: "微信收款码地址", // 微信收款码
          alipay: "支付宝收款码地址" // 支付宝收款码
        },
        copyright: true // 是否显示版权
      }
    }
  }
}

Readme

Keywords

Package Sidebar

Install

npm i gitbook-plugin-lovot-theme

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

317 kB

Total Files

10

Last publish

Collaborators

  • i5tong