Skip to content

Commit 5b3054e

Browse files
committed
support sha
1 parent c83d2d2 commit 5b3054e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Go to the `v1` branch to see the changelog of Lume 1.
1313
- Added missing tests for SEO plugin.
1414
- Renamed `Config` interface of `seo` and `validate_html` plugins to `Options`.
1515
- Added export-ignore paths to `.gitattributes`.
16+
- `site.remote()`: support commit SHA
1617
- Updated dependencies: `deno-loader`, `tailwindcss`, `html-validate`, `magic-string`, `minify-html` and some icons.
1718

1819
## [3.1.1] - 2025-10-20

core/utils/cdn.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ export async function getVersion(
119119
name: string,
120120
version: string,
121121
): Promise<string | undefined> {
122+
// Check if the version is a hash (commit SHA)
123+
if (type === "gh" && /^[0-9a-f]{7,40}$/.test(version)) {
124+
return version;
125+
}
126+
// Fetch versions from jsDelivr API
122127
const url = `https://data.jsdelivr.com/v1/package/${type}/${name}`;
123128
const res = await fetch(url);
124129
if (!res.ok) {

0 commit comments

Comments
 (0)