Skip to content

Commit f69160c

Browse files
committed
fixed lume run
1 parent 4edc13c commit f69160c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Go to the `v1` branch to see the changelog of Lume 1.
99
## [3.1.2] - Unreleased
1010
### Fixed
1111
- Ensure console output for validate_html and seo plugins are after the build process.
12+
- `run` command.
1213
- Added missing tests for SEO plugin.
1314
- Added export-ignore paths to `.gitattributes`.
1415

cli/run.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
import { resolveConfigFile } from "../core/utils/lume_config.ts";
12
import { createSite } from "./utils.ts";
23

34
/** Run one or more custom scripts */
45
export async function run(
56
config: string | undefined,
67
scripts: string[],
78
) {
8-
const site = await createSite(config);
9+
const _config = await resolveConfigFile(["_config.ts", "_config.js"], config);
10+
const site = await createSite(_config);
911

1012
for (const script of scripts) {
1113
const success = await site.run(script);

plugins/seo/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function headingOrder(document: Document): ErrorMessage[] {
186186
results.push({
187187
msg: "HEADING_ORDER",
188188
heading: heading.tagName,
189-
text: heading.textContent,
189+
text: heading.textContent ?? undefined,
190190
});
191191
}
192192
previousLevel = currentLevel;

0 commit comments

Comments
 (0)