@ascribed/astro 0.2.1-next.13 → 0.2.1-next.14
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/README.md +17 -3
- package/dist/content.d.ts +3 -0
- package/dist/content.js +31 -2
- package/dist/content.js.map +1 -1
- package/dist/dev.d.ts +2 -1
- package/dist/dev.js +6 -5
- package/dist/dev.js.map +1 -1
- package/dist/files.d.ts +13 -5
- package/dist/files.js +23 -9
- package/dist/files.js.map +1 -1
- package/dist/index.d.ts +27 -11
- package/dist/index.js +199 -108
- package/dist/index.js.map +1 -1
- package/dist/permalinks.d.ts +20 -2
- package/dist/permalinks.js +45 -16
- package/dist/permalinks.js.map +1 -1
- package/dist/project.d.ts +3 -2
- package/dist/project.js +6 -4
- package/dist/project.js.map +1 -1
- package/dist/projects.d.ts +44 -0
- package/dist/projects.js +140 -0
- package/dist/projects.js.map +1 -0
- package/dist/review/devfile.d.ts +6 -1
- package/dist/review/devfile.js +12 -2
- package/dist/review/devfile.js.map +1 -1
- package/dist/run.d.ts +2 -2
- package/dist/run.js +1 -1
- package/dist/run.js.map +1 -1
- package/package.json +6 -5
- package/src/MissingPermalink.astro +9 -6
- package/src/Permalink.astro +4 -3
package/src/Permalink.astro
CHANGED
|
@@ -9,18 +9,19 @@
|
|
|
9
9
|
//
|
|
10
10
|
// A retired permalink with nowhere to lead gets a page that says what was
|
|
11
11
|
// here was removed, gives the reason as its authors wrote it, as text, and
|
|
12
|
-
// links to the docs' home.
|
|
13
|
-
import { home,
|
|
12
|
+
// links to the docs' home: the root of the project whose list named it.
|
|
13
|
+
import { home as root, permalinks } from "virtual:ascribe/site";
|
|
14
14
|
import { forwardingPaths, type Forwarding } from "@ascribed/astro/permalinks";
|
|
15
15
|
|
|
16
16
|
export function getStaticPaths() {
|
|
17
|
-
return forwardingPaths(
|
|
17
|
+
return forwardingPaths(permalinks);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const props = Astro.props as Forwarding;
|
|
21
21
|
const to = "to" in props ? props.to : undefined;
|
|
22
22
|
const dimensions = "to" in props ? props.dimensions : {};
|
|
23
23
|
const reason = "reason" in props ? props.reason : undefined;
|
|
24
|
+
const home = ("reason" in props ? props.home : undefined) ?? root;
|
|
24
25
|
const canonical =
|
|
25
26
|
to === undefined || Astro.site === undefined ? to : new URL(to, Astro.site).href;
|
|
26
27
|
---
|