mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-09 03:03:18 +00:00
docs: fix external link display text (#6323)
This commit is contained in:
parent
f8a9fa7b67
commit
d1cc5cca69
@ -1,5 +1,5 @@
|
|||||||
import { splitByCase, upperFirst } from 'scule'
|
import { splitByCase, upperFirst } from 'scule'
|
||||||
|
|
||||||
export default (title, link) => {
|
export default (title, link) => {
|
||||||
return title || link.split('/').filter(Boolean).map(part => splitByCase(part).map(p => upperFirst(p)).join(' ')).join(' > ').replace('Api', 'API')
|
return title || (link.startsWith('http') && link) || link.split('/').filter(Boolean).map(part => splitByCase(part).map(p => upperFirst(p)).join(' ')).join(' > ').replace('Api', 'API')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user