mirror of
https://github.com/type-challenges/type-challenges.git
synced 2025-12-08 19:06:13 +00:00
chore: use jsDelivr for raw files
This commit is contained in:
parent
bc4c1d955b
commit
80a7a28d1c
@ -28,10 +28,11 @@ export function toQuizREADME(quiz: Quiz, locale?: string, absolute = false) {
|
||||
}
|
||||
|
||||
export function toRawREADME(quiz: Quiz, locale?: string) {
|
||||
const prefix = 'https://raw.githubusercontent.com/type-challenges/type-challenges/master'
|
||||
const provider = 'https://cdn.jsdelivr.net/gh/type-challenges/type-challenges'
|
||||
// const provider = 'https://raw.githubusercontent.com/type-challenges/type-challenges/master'
|
||||
return locale && locale !== defaultLocale && quiz.readme[locale]
|
||||
? `${prefix}/questions/${quiz.path}/README.${locale}.md`
|
||||
: `${prefix}/questions/${quiz.path}/README.md`
|
||||
? `${provider}/questions/${quiz.path}/README.${locale}.md`
|
||||
: `${provider}/questions/${quiz.path}/README.md`
|
||||
}
|
||||
|
||||
export function toNearborREADME(quiz: Quiz, locale?: string) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user