• 如何给oneindex网盘增加评论、密码查看、read me,头提示功能。


    欢迎访问我的博客https://www.ndmiao.cn/

    视频教程地址

    点击查看

    评论功能

    特性

    1. 使用 GitHub 登录
    2. 支持多语言 [en, zh-CN, zh-TW, es-ES, fr, ru]
    3. 支持个人或组织
    4. 无干扰模式(设置 distractionFreeMode 为 true 开启)
    5. 快捷键提交评论 (cmd|ctrl + enter)

    安装准备

    先进入你选择的主题文件夹,位于网站根目录/view/下,classic为默认主题,我选用的是nexmoe主题
    编辑layout.php文件,在</head>前添加

    1. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
    2. <script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>

    在倒数第一个</div>前添加

    1. <div id="gitalk-container"></div>

    在倒数第一个</div>后添加

    1. <script type="text/javascript">
    2. var gitalk = new Gitalk({
    3. clientID: 'GitHub Application Client ID',
    4. clientSecret: 'GitHub Application Client Secret',
    5. repo: 'gitalk',
    6. owner: 'owner',
    7. admin: ['owner'],
    8. id: 'oneindex',
    9. distractionFreeMode: true,
    10. createIssueManually: true
    11. });
    12. gitalk.render('gitalk-container');
    13. </script>

    获取clientID和clientSecret

    首先,需要申请一个 Github APP ,填写要求如下:

    1. Application name :
    2. myoneindex # 随意填写
    3. Homepage URL :
    4. https://pan.fingerit.cn #你的oneindex主页
    5. Application description :
    6. # 说明(可以不填)
    7. Authorization callback URL :
    8. https://pan.fingerit.cn # 你的oneindex主页
    9. 最后点击 Registered application 得到clientIDclientSecret

    然后新建一个名为talk的仓库。

    完成安装

    返回准备工作总最后一步添加的js代码,将上面获取的clientID和clientSecret填入其中,owner和admin设置为你的用户名即可。
    最后打开你的oneindex首页,等待最下方gitalk评论加载完毕,点击初始化issue,再刷新页面即可。

    密码功能

    在onedrive的文件夹中添加.password文件,填入密码,密码不能为空。

    头提示功能

    在onedrive的文件夹中添加HEAD.md 文件,使用markdown语法。

    read me

    在onedrive的文件夹中添加 README.md 文件,使用markdown语法。

    README.md HEAD.md 、 .password特殊文件使用

    可以参考https://github.com/donwa/oneindex/tree/files

    转载https://www.fingertc.com/archives/276/#%E7%89%B9%E6%AE%8A%E6%96%87%E4%BB%B6%E5%AE%9E%E7%8E%B0%E5%8A%9F%E8%83%BD

  • 相关阅读:
    SOGo 2.0 发布,群组协同工作系统
    微软随.NET 4.5发布新REST API框架
    DynamicReports 3.0.2 发布,Java 报表方案
    使用 Ant 集成 IBM Security AppScan Standard 进行自动测试
    SUSE 用 zypper 工具 安装 rpm
    嵌入式ARM系统中OpenCV的移植
    qtopiax86安装配置及编程方法
    [转]QTCreator的使用
    在Qt Creator中使用OpenCV库
    vim
  • 原文地址:https://www.cnblogs.com/ndmiao/p/10728128.html
Copyright © 2020-2023  润新知