starlight-versions 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # starlight-versions
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#57](https://github.com/HiDeoo/starlight-versions/pull/57) [`669cb51`](https://github.com/HiDeoo/starlight-versions/commit/669cb51da8f92541a08ea84bfc1fb6dd5624f903) Thanks [@trueberryless](https://github.com/trueberryless)! - Adds German UI translations
8
+
9
+ ## 0.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#52](https://github.com/HiDeoo/starlight-versions/pull/52) [`6342b0d`](https://github.com/HiDeoo/starlight-versions/commit/6342b0d8c5954aa3202589127e56a32b3f572537) Thanks [@mierak](https://github.com/mierak)! - Adds support for versioning assets imported as strings using Vite `?raw` suffix.
14
+
15
+ ### Patch Changes
16
+
17
+ - [#55](https://github.com/HiDeoo/starlight-versions/pull/55) [`658c5cc`](https://github.com/HiDeoo/starlight-versions/commit/658c5ccebba78e3108e94050cdaaf7d7b5736da1) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes a potential sidebar link generation issue where links were not correctly prefixed by a version.
18
+
3
19
  ## 0.6.0
4
20
 
5
21
  ### Minor Changes
package/libs/markdown.ts CHANGED
@@ -15,7 +15,7 @@ import { getFrontmatterNodeValue, parseFrontmatter } from './starlight'
15
15
  import type { Version, VersionAsset } from './versions'
16
16
 
17
17
  const importPathRegex = /(from ?["'])([^"']*)(["'];?\s?)$/gm
18
- const astroAssetRegex = /\.(png|jpg|jpeg|tiff|webp|gif|svg|avif)$/i
18
+ const astroAssetRegex = /\.(png|jpg|jpeg|tiff|webp|gif|svg|avif|.+\?raw)$/i
19
19
 
20
20
  const mediaElements = new Set(['img', 'source', 'Image', 'audio', 'video'])
21
21
 
package/libs/starlight.ts CHANGED
@@ -66,7 +66,7 @@ export function addPrefixToSidebarConfig(
66
66
  }
67
67
 
68
68
  const segments = item.link.split('/')
69
- segments.splice(1, 0, prefix)
69
+ segments.splice(/^[./]/.test(item.link) ? 1 : 0, 0, prefix)
70
70
 
71
71
  return {
72
72
  ...item,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-versions",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "license": "MIT",
5
5
  "description": "Starlight plugin to version documentation pages.",
6
6
  "author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",
package/translations.ts CHANGED
@@ -8,4 +8,15 @@ export const Translations = {
8
8
  'starlightVersions.search.outdated.slug': 'Search limited to the {{slug}} version.',
9
9
  'starlightVersions.select.accessibleLabel': 'Select version',
10
10
  },
11
+ de: {
12
+ 'starlightVersions.link.latest':
13
+ 'Geh zur <a href={{link}}>neuesten Version</a>, um die aktuellste Dokumentation zu bekommen.',
14
+ 'starlightVersions.outdated.label': 'Dieser Inhalt ist für {{label}}.',
15
+ 'starlightVersions.outdated.slug': 'Dieser Inhalt ist für die Version {{slug}}.',
16
+ 'starlightVersions.search.link.latest':
17
+ 'Geh zur <a href={{link}}>neuesten Version</a>, um aktuelle Ergebnisse zu bekommen.',
18
+ 'starlightVersions.search.outdated.label': 'Suche beschränkt auf {{label}}.',
19
+ 'starlightVersions.search.outdated.slug': 'Suche nur in der Version {{slug}}.',
20
+ 'starlightVersions.select.accessibleLabel': 'Version auswählen',
21
+ },
11
22
  }