@t8/docsgen 0.2.43 → 0.2.44
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/dist/bin.js +12 -4
- package/package.json +1 -1
- package/src/bin/setContent.ts +15 -5
package/dist/bin.js
CHANGED
|
@@ -691,14 +691,12 @@ async function setContent(ctx) {
|
|
|
691
691
|
root,
|
|
692
692
|
contentDir = "",
|
|
693
693
|
name,
|
|
694
|
-
title,
|
|
694
|
+
title: configTitle,
|
|
695
695
|
description: packageDescription,
|
|
696
696
|
backstory,
|
|
697
697
|
redirect
|
|
698
698
|
} = ctx;
|
|
699
699
|
let counterContent = getCounterContent(ctx);
|
|
700
|
-
let escapedName = escapeHTML(name);
|
|
701
|
-
let escapedTitle = title ? escapeHTML(title) : escapedName;
|
|
702
700
|
let escapedPackageDescription = escapeHTML(packageDescription);
|
|
703
701
|
let rootAttrs = "";
|
|
704
702
|
let cssRoot = {
|
|
@@ -751,7 +749,17 @@ ${getInjectedContent(ctx, "redirect", "body")}
|
|
|
751
749
|
);
|
|
752
750
|
return;
|
|
753
751
|
}
|
|
754
|
-
let {
|
|
752
|
+
let {
|
|
753
|
+
title,
|
|
754
|
+
description,
|
|
755
|
+
intro,
|
|
756
|
+
features,
|
|
757
|
+
note,
|
|
758
|
+
installation,
|
|
759
|
+
sections,
|
|
760
|
+
nav
|
|
761
|
+
} = await getParsedContent(ctx);
|
|
762
|
+
let escapedTitle = configTitle ? escapeHTML(configTitle) : title || escapeHTML(name);
|
|
755
763
|
let descriptionContent = tweakTypography(description) || (escapedPackageDescription ? `<p>${tweakTypography(escapedPackageDescription)}<p>` : "");
|
|
756
764
|
let navContent = await getNav(ctx, nav);
|
|
757
765
|
let dirs = [contentDir];
|
package/package.json
CHANGED
package/src/bin/setContent.ts
CHANGED
|
@@ -48,15 +48,13 @@ export async function setContent(ctx: Context) {
|
|
|
48
48
|
root,
|
|
49
49
|
contentDir = "",
|
|
50
50
|
name,
|
|
51
|
-
title,
|
|
51
|
+
title: configTitle,
|
|
52
52
|
description: packageDescription,
|
|
53
53
|
backstory,
|
|
54
54
|
redirect,
|
|
55
55
|
} = ctx;
|
|
56
56
|
|
|
57
57
|
let counterContent = getCounterContent(ctx);
|
|
58
|
-
let escapedName = escapeHTML(name);
|
|
59
|
-
let escapedTitle = title ? escapeHTML(title) : escapedName;
|
|
60
58
|
let escapedPackageDescription = escapeHTML(packageDescription);
|
|
61
59
|
|
|
62
60
|
let rootAttrs = "";
|
|
@@ -129,8 +127,20 @@ ${getInjectedContent(ctx, "redirect", "body")}
|
|
|
129
127
|
return;
|
|
130
128
|
}
|
|
131
129
|
|
|
132
|
-
let {
|
|
133
|
-
|
|
130
|
+
let {
|
|
131
|
+
title,
|
|
132
|
+
description,
|
|
133
|
+
intro,
|
|
134
|
+
features,
|
|
135
|
+
note,
|
|
136
|
+
installation,
|
|
137
|
+
sections,
|
|
138
|
+
nav,
|
|
139
|
+
} = await getParsedContent(ctx);
|
|
140
|
+
|
|
141
|
+
let escapedTitle = configTitle
|
|
142
|
+
? escapeHTML(configTitle)
|
|
143
|
+
: title || escapeHTML(name);
|
|
134
144
|
|
|
135
145
|
let descriptionContent =
|
|
136
146
|
tweakTypography(description) ||
|