Skip to content

Commit b7c30c7

Browse files
committed
fix(tools): demo paths in manifest helpers
1 parent 6937602 commit b7c30c7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/rotten-sloths-crash.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/pfe-tools": patch
3+
---
4+
Manifest: fixed demo paths in manifest helpers

tools/pfe-tools/custom-elements-manifest/lib/Manifest.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
Slot,
1717
} from 'custom-elements-manifest/schema';
1818

19-
import { join, normalize } from 'node:path';
19+
import { dirname, join, normalize } from 'node:path';
2020
import { readFileSync } from 'node:fs';
2121

2222
import { getAllPackages } from './get-all-packages.js';
@@ -301,7 +301,7 @@ export class Manifest {
301301
const manifest = this;
302302
const { prettyTag } = Manifest;
303303
return this.getDemos(tagName).map(demo => {
304-
const permalink = demo.url.replace(options.demoURLPrefix, '/');
304+
const permalink = new URL(demo.url).pathname;
305305

306306
/**
307307
* `/components/`
@@ -328,6 +328,7 @@ export class Manifest {
328328
.replace('.html', '');
329329
return {
330330
tagName,
331+
isMainElementDemo,
331332
primaryElementName,
332333
permalink,
333334
slug,

0 commit comments

Comments
 (0)