starlight-versions 0.6.0 → 0.7.0

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,15 @@
1
1
  # starlight-versions
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#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.
12
+
3
13
  ## 0.6.0
4
14
 
5
15
  ### 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.0",
4
4
  "license": "MIT",
5
5
  "description": "Starlight plugin to version documentation pages.",
6
6
  "author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",