vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.48k stars 4.78k forks source link

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

Open chryw opened 4 years ago

chryw commented 4 years ago

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

chryw commented 4 years ago

FYI @clocky

robertraaijmakers commented 3 years ago

Would be nice to see this one implemented.