2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Docs: migration from Hugo to Astro (#41251)

Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Co-authored-by: Mark Otto <markdotto@gmail.com>
This commit is contained in:
Julien Déramond
2025-04-15 18:37:47 +02:00
committed by GitHub
parent 99a0dc628a
commit a8ab19955b
580 changed files with 25487 additions and 17633 deletions
+22
View File
@@ -0,0 +1,22 @@
import { getConfig } from '../libs/config.ts'
/**
* Vite plugin to replace placeholder values in search.js with actual configuration values
*/
export function algoliaPlugin() {
const config = getConfig()
return {
name: 'algolia-config-replacer',
transform(code, id) {
if (id.includes('search.js')) {
return code
.replace(/__API_KEY__/g, config.algolia.api_key)
.replace(/__INDEX_NAME__/g, config.algolia.index_name)
.replace(/__APP_ID__/g, config.algolia.app_id)
}
return code
}
}
}
+22
View File
@@ -0,0 +1,22 @@
import { getConfig } from '../libs/config.ts'
/**
* Vite plugin to replace placeholder values in stackblitz.js with actual configuration values
*/
export function stackblitzPlugin() {
const config = getConfig()
return {
name: 'stackblitz-config-replacer',
transform(code, id) {
if (id.includes('stackblitz.js')) {
return code
.replace(/__CSS_CDN__/g, config.cdn.css)
.replace(/__JS_BUNDLE_CDN__/g, config.cdn.js_bundle)
.replace(/__DOCS_VERSION__/g, config.docs_version)
}
return code
}
}
}