Compare commits

..

8 Commits

Author SHA1 Message Date
Patrick H. Lauke
c09c03e860
Merge 488329744fc151e5141daf96283f2b89dc2c85b2 into 64b340c37fb89209fc0071b02e48be1fb241f415 2025-07-02 15:04:44 -05:00
Julien Déramond
64b340c37f
Build(deps-dev): Bump the development-dependencies group with 3 updates
- @babel/cli         ^7.27.2  →  ^7.28.0
- @babel/core        ^7.27.7  →  ^7.28.0
- @babel/preset-env  ^7.27.2  →  ^7.28.0
2025-07-02 18:36:08 +02:00
Maxime Lardenois
9566444580
Docs: Sass automatic recompilation in dev mode with Astro (#41574)
Co-authored-by: Julien Déramond <juderamond@gmail.com>
2025-07-02 12:58:34 +02:00
Julien Déramond
c5074c7c18
Fix typo in generated site/src/types/auto-import.d.ts 2025-07-01 23:10:52 +02:00
Julien Déramond
879d1d15dc
Fix several typos in comments within TypeScript files in site/src/libs 2025-07-01 23:06:58 +02:00
Julien Déramond
7d12ff7b3b
Fix typo in JsDocs and ScssDocs shortcodes comments 2025-07-01 22:58:50 +02:00
Julien Déramond
9fce97c4b2
Fix missing space between classes in Navbars example 2025-07-01 22:53:44 +02:00
Julien Déramond
aecf990fc5
Build(deps-dev): Bump astro from 5.10.1 to 5.10.2 2025-07-01 18:53:25 +02:00
13 changed files with 350 additions and 357 deletions

655
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -113,9 +113,9 @@
"@astrojs/mdx": "^4.3.0", "@astrojs/mdx": "^4.3.0",
"@astrojs/prism": "^3.3.0", "@astrojs/prism": "^3.3.0",
"@astrojs/sitemap": "^3.4.1", "@astrojs/sitemap": "^3.4.1",
"@babel/cli": "^7.27.2", "@babel/cli": "^7.28.0",
"@babel/core": "^7.27.7", "@babel/core": "^7.28.0",
"@babel/preset-env": "^7.27.2", "@babel/preset-env": "^7.28.0",
"@docsearch/js": "^3.9.0", "@docsearch/js": "^3.9.0",
"@popperjs/core": "^2.11.8", "@popperjs/core": "^2.11.8",
"@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-babel": "^6.0.4",
@ -126,7 +126,7 @@
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/mime": "^4.0.0", "@types/mime": "^4.0.0",
"@types/prismjs": "^1.26.5", "@types/prismjs": "^1.26.5",
"astro": "^5.10.1", "astro": "^5.10.2",
"astro-auto-import": "^0.4.4", "astro-auto-import": "^0.4.4",
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.21",
"bundlewatch": "^0.4.1", "bundlewatch": "^0.4.1",

View File

@ -6,7 +6,6 @@ import Stylesheet from '@components/head/Stylesheet.astro'
import Favicons from '@components/head/Favicons.astro' import Favicons from '@components/head/Favicons.astro'
import Social from '@components/head/Social.astro' import Social from '@components/head/Social.astro'
import Analytics from '@components/head/Analytics.astro' import Analytics from '@components/head/Analytics.astro'
import Scss from '@components/head/Scss.astro'
interface Props { interface Props {
description: string description: string
@ -25,6 +24,10 @@ const isHome = Astro.url.pathname === '/'
const pageTitle = isHome const pageTitle = isHome
? `${getConfig().title} · ${getConfig().subtitle}` ? `${getConfig().title} · ${getConfig().subtitle}`
: `${title} · ${getConfig().title} v${getConfig().docs_version}` : `${title} · ${getConfig().title} v${getConfig().docs_version}`
// Dynamic imports to avoid build-time processing
const Scss = import.meta.env.PROD ? null : await import('@components/head/Scss.astro')
const ScssProd = import.meta.env.PROD ? await import('@components/head/ScssProd.astro') : null
--- ---
<meta charset="UTF-8" /> <meta charset="UTF-8" />
@ -47,8 +50,15 @@ const pageTitle = isHome
<script is:inline src={getVersionedDocsPath('assets/js/color-modes.js')}></script> <script is:inline src={getVersionedDocsPath('assets/js/color-modes.js')}></script>
{import.meta.env.PROD && ScssProd && (
<Stylesheet direction={direction} layout={layout} /> <Stylesheet direction={direction} layout={layout} />
<Scss /> <ScssProd.default />
)}
{!import.meta.env.PROD && Scss && (
<Scss.default />
)}
<Favicons /> <Favicons />
<Social description={description} layout={layout} thumbnail={thumbnail} title={title} /> <Social description={description} layout={layout} thumbnail={thumbnail} title={title} />
<Analytics /> <Analytics />

View File

@ -2,6 +2,7 @@
--- ---
<style is:global lang="scss"> <style is:global lang="scss">
@import '../../../../scss/bootstrap.scss';
@import '../../scss/docs'; @import '../../scss/docs';
@import '../../scss/docs_search'; @import '../../scss/docs_search';
</style> </style>

View File

@ -0,0 +1,7 @@
---
---
<style is:global lang="scss">
@import '../../scss/docs';
@import '../../scss/docs_search';
</style>

View File

@ -40,7 +40,7 @@ try {
content = matches[1] content = matches[1]
// Fix the identation by removing extra spaces at the beginning of each line // Fix the indentation by removing extra spaces at the beginning of each line
const lines = content.split('\n') const lines = content.split('\n')
const spaceCounts = lines.filter((line) => line.trim().length > 0).map((line) => line.match(/^ */)[0].length) const spaceCounts = lines.filter((line) => line.trim().length > 0).map((line) => line.match(/^ */)[0].length)
const minSpaces = spaceCounts.length ? Math.min(...spaceCounts) : 0 const minSpaces = spaceCounts.length ? Math.min(...spaceCounts) : 0

View File

@ -42,7 +42,7 @@ try {
content = matches[1].replaceAll(' !default', '') content = matches[1].replaceAll(' !default', '')
// Fix the identation by removing extra spaces at the beginning of each line // Fix the indentation by removing extra spaces at the beginning of each line
const lines = content.split('\n') const lines = content.split('\n')
const spaceCounts = lines.filter((line) => line.trim().length > 0).map((line) => line.match(/^ */)[0].length) const spaceCounts = lines.filter((line) => line.trim().length > 0).map((line) => line.match(/^ */)[0].length)
const minSpaces = spaceCounts.length ? Math.min(...spaceCounts) : 0 const minSpaces = spaceCounts.length ? Math.min(...spaceCounts) : 0

View File

@ -120,7 +120,7 @@ function bootstrap_auto_import() {
const autoImportedComponentDefinition = `/** const autoImportedComponentDefinition = `/**
* DO NOT EDIT THIS FILE MANUALLY. * DO NOT EDIT THIS FILE MANUALLY.
* *
* This file is automatically generated by the Boostrap Astro Integration. * This file is automatically generated by the Bootstrap Astro Integration.
* It contains the type definitions for the components that are auto imported in all pages. * It contains the type definitions for the components that are auto imported in all pages.
* @see site/src/libs/astro.ts * @see site/src/libs/astro.ts
*/ */

View File

@ -25,8 +25,8 @@ export function getVersionedDocsPath(docsPath: string): string {
// This is useful to catch typos in docs paths. // This is useful to catch typos in docs paths.
// Note: this function is only called during a production build. // Note: this function is only called during a production build.
// Note: this could at some point be refactored to use Astro list of generated `routes` accessible in the // Note: this could at some point be refactored to use Astro list of generated `routes` accessible in the
// `astro:build:done` integration hook. Altho as of 03/14/2023, this is not possible due to the route's data only // `astro:build:done` integration hook. Although as of 03/14/2023, this is not possible due to the route's data only
// containing informations regarding the last page generated page for dynamic routes. // containing information regarding the last page generated page for dynamic routes.
// @see https://github.com/withastro/astro/issues/5802 // @see https://github.com/withastro/astro/issues/5802
export function validateVersionedDocsPaths(distUrl: URL) { export function validateVersionedDocsPaths(distUrl: URL) {
const { docs_version } = getConfig() const { docs_version } = getConfig()

View File

@ -215,13 +215,13 @@ export interface PlaceholderOptions {
*/ */
markup: 'img' | 'svg' markup: 'img' | 'svg'
/** /**
* The text to show in the image. You can explicitely pass the `false` boolean value (and not the string "false") to * The text to show in the image. You can explicitly pass the `false` boolean value (and not the string "false") to
* hide the text. * hide the text.
* @default "${width}x{$height)" * @default "${width}x{$height)"
*/ */
text: string | false text: string | false
/** /**
* Used in the SVG `title` tag. You can explicitely pass the `false` boolean value (and not the string "false") to * Used in the SVG `title` tag. You can explicitly pass the `false` boolean value (and not the string "false") to
* hide the title. * hide the title.
* @default "Placeholder" * @default "Placeholder"
*/ */

View File

@ -56,7 +56,7 @@ export const remarkBsConfig: Plugin<[], Root> = function () {
} }
} }
// A remark plugin to add versionned docs links in markdown (or MDX) files. // A remark plugin to add versioned docs links in markdown (or MDX) files.
// For example, [[docsref:/foo]] will be replaced with the `/docs/${docs_version}/foo` value with the `docs_version` // For example, [[docsref:/foo]] will be replaced with the `/docs/${docs_version}/foo` value with the `docs_version`
// value being read from the `config.yml` file. // value being read from the `config.yml` file.
// Note: this also works in frontmatter. // Note: this also works in frontmatter.

View File

@ -1,7 +1,7 @@
/** /**
* DO NOT EDIT THIS FILE MANUALLY. * DO NOT EDIT THIS FILE MANUALLY.
* *
* This file is automatically generated by the Boostrap Astro Integration. * This file is automatically generated by the Bootstrap Astro Integration.
* It contains the type definitions for the components that are auto imported in all pages. * It contains the type definitions for the components that are auto imported in all pages.
* @see site/src/libs/astro.ts * @see site/src/libs/astro.ts
*/ */