Skip to content

Support Azure Repos url in "PageEdit.vue" #1959

Open
@chryw

Description

@chryw

Feature request

What problem does this feature solve?

Our team uses VuePress for our internal documentation site. Our repo needs to be hosted on Azure Repos, not GitHub or Bitbucket. The current default theme doesn't have the Azure Repos url pattern. I'd like to add it to the default theme.

What does the proposed API look like?

image

How should this be implemented in your opinion?

https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/theme-default/components/PageEdit.vue#L82

const azurerepos = /dev\.azure\.com|\w+\.visualstudio\.com/
if (azurerepos.test(repo)) {
        const base = outboundRE.test(docsRepo) ? docsRepo : repo
        return (
          base.replace(endingSlashRE, '')
          + `?path=`
          + (docsDir ? docsDir.replace(endingSlashRE, '') + '/' : '')
          + path
          + `&version=GBmaster`
        )
      }

Are you willing to work on this yourself?

Yes
#1960

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions