Skip to content

如何把github在线编辑的url中分支改成其他的? #2097

Answered by ChenSino
ChenSino asked this question in Q&A
Discussion options

You must be logged in to vote

找到了,在HopeThemeDocsLocaleOptions有个docsBranch可以用。

export interface HopeThemeDocsLocaleOptions {
    /**
     * Pattern of edit link, we provide built-in support for GitHub, Gitlab, Gitee, Bitbucket
     *
     * 编辑链接的匹配,我们已经为 GitHub、Gitlab、Gitee 和 Bitbucket 提供了内置支持
     *
     * @example ':repo/edit/:branch/:path'
     */
    editLinkPattern?: string;
    /**
     * The repo of your docs
     *
     * 文档仓库
     *
     * @default themeConfig.repo
     */
    docsRepo?: string;
    /**
     * The branch of your docs
     *
     * 文档所在分支
     *
     * @default 'main'
     */
    docsBranch?: string;
    /**
     * Docs dir location in repo
     *
     * 文档在仓库中的目录
     *
     * @default ''
     */

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ChenSino
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ChenSino
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants