jaywcjlove / refs-cli

Command line tool to generate Quick Reference website.

Home Page:https://jaywcjlove.github.io/refs-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

编辑按钮始终链向jaywcjlove/reference仓库且无法关闭编辑按钮

liesauer opened this issue · comments

假设我做了一份自己的reference,那么编辑按钮链向jaywcjlove/reference肯定是不对的,而且如果我的reference是对外面向其他人员的话,我是希望关闭编辑按钮功能的。希望能通过配置的方式修改编辑链向仓库和关闭编辑功能。

const githubURL = `https://github.com/jaywcjlove/reference/blob/main/${path
.relative(process.cwd(), dataFile.path)
.replace(path.sep, '/')}`;

{
menu: true,
href: options.githubURL,
target: '__blank',
label: options.config.editor?.label || 'Edit',
children: [editor],
},

refs-cli/.refsrc.json

Lines 14 to 15 in baca374

"github": {
"url": "https://github.com/jaywcjlove/refs-cli"

@liesauer 添加配置即可,更新到 v1.2.15

你好,方便连同编辑按钮也可配置不显示嘛,我有一些非开源的文档并不想提供编辑功能。

editor?: {
label: string;
disabled?: boolean;
},

@liesauer 更新到 v1.3.0

refs-cli/.refsrc.json

Lines 11 to 13 in 3820fe1

"editor": {
"label": "Edit"
},

{
  "editor": {
    "disabled": true
  }
}

感谢!