alias for external links in ( vuejs or vuepress )

323 views Asked by At

Question:

What is the proper way to define an alias for external links in vuepress2 or vuejs?

Problem:

I have a documentation site hosted in github pages, I want to link some source files to documentation.

[task-runner.json](https://github.com/alirezanet/Husky.Net/blob/master/.husky/task-runner.json)

this works but I rather create an alias for the base path. something like this:

@repo : 
https://github.com/alirezanet/Husky.Net/blob/master/.husky/task-runner.json

and use it like this

[task-runner.json](@repo/.husky/task-runner.json)

Notes:

  • because vuepress2 is using vuejs3, probably vuejs solution works too

  • vuepress default-theme also has repo configuration, is there any way to use it in router-links or md-files?

import type { DefaultThemeOptions } from 'vuepress'

export const themeConfig: DefaultThemeOptions = {
   docsRepo: 'alirezanet/husky.net',
   repo: 'alirezanet/husky.net',
}

0

There are 0 answers