Skip to content

Commit

Permalink
chore: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-ub committed Oct 7, 2024
1 parent e068456 commit aced317
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/LanguageSelect.astro
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function localizedPathname(locale: string | undefined): string {
}

<script>
class StarlightLanguageSelect extends HTMLElement {
class VitesseLanguageSelect extends HTMLElement {
constructor() {
super()
const select = this.querySelector('select')
Expand All @@ -42,5 +42,5 @@ function localizedPathname(locale: string | undefined): string {
}
}
}
customElements.define('vitesse-lang-select', StarlightLanguageSelect)
customElements.define('vitesse-lang-select', VitesseLanguageSelect)
</script>
2 changes: 1 addition & 1 deletion src/i18n.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file imports the original `i18next` types and extends them to configure the
* Starlight namespace.
* Vitesse namespace.
*
* Note that the top-level `import` makes this module non-ambient, so can’t be
* combined with other `.d.ts` files such as `locals.d.ts`.
Expand Down
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* These triple-slash directives defines dependencies to various declaration files that will be
* loaded when a user imports the Starlight integration in their Astro configuration file. These
* loaded when a user imports the Vitesse integration in their Astro configuration file. These
* directives must be first at the top of the file and can only be preceded by this comment.
*/
/// <reference path="./locals.d.ts" />
Expand Down Expand Up @@ -84,10 +84,10 @@ export default function VitesseIntegration({
integrations.push(mdx({ optimize: true }))
}

// Add integrations immediately after Starlight in the config array.
// e.g. if a user has `integrations: [starlight(), tailwind()]`, then the order will be
// `[starlight(), expressiveCode(), sitemap(), mdx(), tailwind()]`.
// This ensures users can add integrations before/after Starlight and we respect that order.
// Add integrations immediately after Vitesse in the config array.
// e.g. if a user has `integrations: [vitesse(), tailwind()]`, then the order will be
// `[vitesse(), expressiveCode(), sitemap(), mdx(), tailwind()]`.
// This ensures users can add integrations before/after Vitesse and we respect that order.
const selfIndex = config.integrations.findIndex(i => i.name === 'astro-vitesse')
config.integrations.splice(selfIndex + 1, 0, ...integrations)

Expand Down
14 changes: 14 additions & 0 deletions src/rehype-toc.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
declare module '@microflash/rehype-toc' {
import type { Plugin } from 'unified'
import type { Node } from 'unist'

interface RehypeTocOptions {
matcher?: RegExp
id?: string
toc?: (headings: { id: string, title: string, depth: number }[]) => Node
}

const rehypeToc: Plugin<[RehypeTocOptions?]>

export default rehypeToc
}

0 comments on commit aced317

Please sign in to comment.