gitbook-plugin-copyright 👋

NPM Version NPM Download Documentation Maintenance License: MIT Github: snowdreams1006 微信公众号: 雪之梦技术驿站

gitbook-plugin-copyright 是基于Gitbook实现的版权保护插件,用于复制内容时追加版权信息以及文章末尾添加版权小尾巴.

🏠 主页

效果

copyright-use-preview.png

特色

  • 支持复制内容自动追加版本保护信息
  • 支持文章末尾自动生成版本保护尾巴
  • 支持自定义小尾巴版权保护图片
  • 支持 Gitbook 多语言环境

✨ 示例

不仅 gitbook-plugin-copyright 官方文档已整合 copyright 版权保护插件,此外还提供了示例项目,详情参考 example 目录.

{
    "plugins": ["copyright"],
    "pluginsConfig": {
        "copyright": {
        "site": "https://snowdreams1006.github.io/gitbook-plugin-copyright",
        "author": "雪之梦技术驿站",
        "website": "雪之梦技术驿站",
        "image": "https://snowdreams1006.github.io/snowdreams1006-wechat-open.png"
        }
    }
}

🚀 用法

Step #1 - 更新 book.json 配置文件

  1. book.json 配置文件中,添加 copyrightplugins 列表.
  2. book.json 配置文件中,配置 pluginsConfig 对象.

单语言版简单示例 book.json

{
    "plugins": ["copyright"],
    "pluginsConfig": {
        "copyright": {
        "site": "https://snowdreams1006.github.io/gitbook-plugin-copyright",
        "author": "雪之梦技术驿站",
        "website": "雪之梦技术驿站",
        "image": "https://snowdreams1006.github.io/snowdreams1006-wechat-open.png"
        }
    }
}

多语言版简单示例 book.json

{
    "plugins": ["copyright"],
    "pluginsConfig": {
        "copyright": {
            "site": "https://snowdreams1006.github.io/gitbook-plugin-copyright",
            "author": {
                "en": "snowdreams1006",
                "zh": "雪之梦技术驿站"
            },
            "website": {
                "en": "snowdreams1006's Gitbook",
                "zh": "雪之梦技术驿站"
            },
            "image": {
                "en": "https://img.shields.io/badge/github-snowdreams1006-brightgreen.svg",
                "zh": "https://snowdreams1006.github.io/snowdreams1006-wechat-open.png"
            }
        }
    }
}

其中,配置参数含义如下:

  • site : [必选]部署网站基本路径
  • author : [必选]作者信息
  • website : [必选]网站名称
  • image : [可选]版权保护图片

Step #2 - 运行 gitbook 相关命令

  • 运行 gitbook install 命令安装到本地项目
$ gitbook install
  • 运行 gitbook build 命令构建本地项目或者 gitbook serve 启动本地服务.
$ gitbook build

或者

$ gitbook serve

🤝 贡献

如果你想贡献自己的一份力量,欢迎提交 Issues 或者拉取 Pull Request 请求!

$ git checkout -b feature/fooBar
  • 提交 commit 描述
$ git commit -am 'Add some fooBar'
  • 推送到远程分支
$ git push origin feature/fooBar
  • 创建新的 Pull Request

作者

👤 snowdreams1006

支持

如果本项目对你有所帮助,欢迎 ⭐️ gitbook-plugin-copyright 项目,感谢你的支持与认可!

snowdreams1006-wechat-donate.jpg

📝 版权

Copyright © 2019 snowdreams1006.

This project is MIT licensed.

作者: 雪之梦技术驿站
链接: https://snowdreams1006.github.io/gitbook-plugin-copyright/
来源: 雪之梦技术驿站
本文原创发布于「雪之梦技术驿站」,转载请注明出处,谢谢合作!

https://snowdreams1006.github.io/snowdreams1006-wechat-open.png

results matching ""

    No results matching ""