Skip to content

Commit

Permalink
final tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Jul 18, 2024
1 parent fff3f72 commit 73d0e9d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Go to the `v1` branch to see the changelog of Lume 1.
- New middleware `redirect_as2` [#632].

### Fixed
- `page.sourcePath` wrongly returns the remote url instead of the path for remote files.
- Reload remote files [#633].
- Vento components must be sync.
- Updated dependencies: `std`, `terser`, `sass`, `xml`, `liquid`, `highlight.js`, `unocss`, `decap_cms`, `tailwindcss`, `vento`, `preact-render-to-string`.
Expand Down
4 changes: 0 additions & 4 deletions core/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ export class Page<D extends Data = Data> {

/** Returns the source path of this page */
get sourcePath(): string {
if (this.src.entry?.flags.has("remote")) {
return this.src.entry.src;
}

if (!this.src.path) {
return "(generated)";
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/source_maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function prepareAsset(site: Site, page: Page): PrepareResult {
? page.data.sourceMap as SourceMap | undefined
: undefined;
const filename = page.src.path
? site.src(page.src.path + page.src.ext) // Don't use page.sourcePath because it can be remote
? site.src(page.sourcePath)
: site.src(page.outputPath);
return { content, sourceMap, filename, enableSourceMap };
}
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export async function assertSiteSnapshot(
path: page.src.path,
ext: page.src.ext,
remote: page.src.entry?.flags.has("remote")
? page.sourcePath.replace(cwUrl, "")
? page.src.entry.src.replace(cwUrl, "")
: undefined,
asset: page.asset,
},
Expand Down

0 comments on commit 73d0e9d

Please sign in to comment.