@t8/docsgen 0.3.15 → 0.3.17
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 +2 -6
- package/dist/css/index.css +7 -2
- package/package.json +1 -1
- package/schema.json +1 -1
- package/src/bin/parsing/getParsedContent.ts +2 -7
- package/src/css/index.css +7 -2
- package/src/types/EntryConfig.ts +0 -1
package/dist/bin.js
CHANGED
|
@@ -569,7 +569,7 @@ var md = new Markdown({
|
|
|
569
569
|
html: true
|
|
570
570
|
});
|
|
571
571
|
async function getParsedContent(ctx) {
|
|
572
|
-
let { singlePage, firstLineDescription,
|
|
572
|
+
let { singlePage, firstLineDescription, linkMap } = ctx;
|
|
573
573
|
let rawContent = await fetchContent(
|
|
574
574
|
getLocation(ctx, "README.md", ctx.source)
|
|
575
575
|
);
|
|
@@ -628,11 +628,7 @@ async function getParsedContent(ctx) {
|
|
|
628
628
|
description.push(outerHTML);
|
|
629
629
|
continue;
|
|
630
630
|
}
|
|
631
|
-
|
|
632
|
-
intro.push(outerHTML);
|
|
633
|
-
continue;
|
|
634
|
-
}
|
|
635
|
-
indexComplete = true;
|
|
631
|
+
intro.push(outerHTML);
|
|
636
632
|
}
|
|
637
633
|
if (section.length !== 0) sections.push(joinLines(section));
|
|
638
634
|
let postprocess = getSectionPostprocess({
|
package/dist/css/index.css
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
body {
|
|
5
5
|
min-height: 100vh;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
7
|
.layout {
|
|
9
8
|
display: flex;
|
|
10
9
|
flex-direction: column;
|
|
@@ -13,6 +12,9 @@ body {
|
|
|
13
12
|
justify-content: center;
|
|
14
13
|
}
|
|
15
14
|
@media (max-width: 840px) {
|
|
15
|
+
:root {
|
|
16
|
+
--content-padding-x: 1.75rem;
|
|
17
|
+
}
|
|
16
18
|
.layout {
|
|
17
19
|
min-height: 100vh;
|
|
18
20
|
}
|
|
@@ -183,7 +185,10 @@ section.intro .section-content {
|
|
|
183
185
|
align-items: center;
|
|
184
186
|
}
|
|
185
187
|
section.intro .section-content {
|
|
186
|
-
padding-top: 0.
|
|
188
|
+
padding-top: 0.75rem;
|
|
189
|
+
}
|
|
190
|
+
section.intro pre {
|
|
191
|
+
margin: 1.75em 0;
|
|
187
192
|
}
|
|
188
193
|
}
|
|
189
194
|
.features {
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$ref":"#/definitions/Config","$schema":"http://json-schema.org/draft-07/schema#","definitions":{"Config":{"additionalProperties":false,"properties":{"$schema":{"type":"string"},"append":{"$ref":"#/definitions/ContentInjectionMap"},"assetsDir":{"description":"Directory path for assets, relative to `dir`. If not provided, the assets will be added via the package URLs.","type":"string"},"backstory":{"description":"Backstory link URL to be added to the front page.","type":"string"},"cname":{"description":"Content of the './CNAME' file.","type":"string"},"contentDir":{"description":"Generated section content directory.","type":"string"},"description":{"type":"string"},"dir":{"type":"string"},"entries":{"items":{"$ref":"#/definitions/EntryConfig"},"type":"array"},"favicon":{"description":"Favicon URL.","type":"string"},"faviconType":{"type":"string"},"firstLineDescription":{"description":"Whether the first line following the main title is the package description.","type":"boolean"},"
|
|
1
|
+
{"$ref":"#/definitions/Config","$schema":"http://json-schema.org/draft-07/schema#","definitions":{"Config":{"additionalProperties":false,"properties":{"$schema":{"type":"string"},"append":{"$ref":"#/definitions/ContentInjectionMap"},"assetsDir":{"description":"Directory path for assets, relative to `dir`. If not provided, the assets will be added via the package URLs.","type":"string"},"backstory":{"description":"Backstory link URL to be added to the front page.","type":"string"},"cname":{"description":"Content of the './CNAME' file.","type":"string"},"contentDir":{"description":"Generated section content directory.","type":"string"},"description":{"type":"string"},"dir":{"type":"string"},"entries":{"items":{"$ref":"#/definitions/EntryConfig"},"type":"array"},"favicon":{"description":"Favicon URL.","type":"string"},"faviconType":{"type":"string"},"firstLineDescription":{"description":"Whether the first line following the main title is the package description.","type":"boolean"},"htmlTitle":{"type":"string"},"id":{"type":"string"},"isDevDep":{"description":"Whether the package installation instruction should include the \"-D\" flag.","type":"boolean"},"jsorg":{"description":"As a boolean, it means whether to add the '<package_name>.js.org' domain to the './CNAME' file.\n\nAs a string, it sets the '<jsorg_value>.js.org' domain to the './CNAME' file.","type":["boolean","string"]},"linkMap":{"additionalProperties":{"anyOf":[{"type":"string"},{"not":{}}]},"description":"Link substitution map.","type":"object"},"mainBranch":{"type":"string"},"name":{"type":"string"},"nav":{"description":"URL of an HTML file inserted into the navigation bar.","type":"string"},"npm":{"type":"string"},"prepend":{"$ref":"#/definitions/ContentInjectionMap"},"redirect":{"description":"Redirection URL.","type":"string"},"remove":{"description":"Whether to remove the GitHub Pages branch and quit.","type":"boolean"},"repo":{"type":"string"},"root":{"description":"Main page root path.","type":"string"},"singlePage":{"description":"Whether to show all sections on a single page.","type":"boolean"},"source":{"type":"string"},"targetBranch":{"description":"Target branch.","examples":["gh-pages"],"type":"string"},"targetIds":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"version":{"type":"string"},"ymid":{"type":["number","string"]}},"type":"object"},"ContentInjectionMap":{"additionalProperties":false,"properties":{":has-code":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"content":{"type":"string"},"pages":{"items":{"$ref":"#/definitions/Page"},"type":"array"}},"type":"object"},{"items":{"anyOf":[{"type":"string"},{"not":{}},{"additionalProperties":false,"properties":{"content":{"type":"string"},"pages":{"items":{"$ref":"#/definitions/Page"},"type":"array"}},"type":"object"}]},"type":"array"}]},"body":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"content":{"type":"string"},"pages":{"items":{"$ref":"#/definitions/Page"},"type":"array"}},"type":"object"},{"items":{"anyOf":[{"type":"string"},{"not":{}},{"additionalProperties":false,"properties":{"content":{"type":"string"},"pages":{"items":{"$ref":"#/definitions/Page"},"type":"array"}},"type":"object"}]},"type":"array"}]},"cover":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"content":{"type":"string"},"pages":{"items":{"$ref":"#/definitions/Page"},"type":"array"}},"type":"object"},{"items":{"anyOf":[{"type":"string"},{"not":{}},{"additionalProperties":false,"properties":{"content":{"type":"string"},"pages":{"items":{"$ref":"#/definitions/Page"},"type":"array"}},"type":"object"}]},"type":"array"}]},"head":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"content":{"type":"string"},"pages":{"items":{"$ref":"#/definitions/Page"},"type":"array"}},"type":"object"},{"items":{"anyOf":[{"type":"string"},{"not":{}},{"additionalProperties":false,"properties":{"content":{"type":"string"},"pages":{"items":{"$ref":"#/definitions/Page"},"type":"array"}},"type":"object"}]},"type":"array"}]}},"type":"object"},"EntryConfig":{"additionalProperties":false,"properties":{"append":{"$ref":"#/definitions/ContentInjectionMap"},"assetsDir":{"description":"Directory path for assets, relative to `dir`. If not provided, the assets will be added via the package URLs.","type":"string"},"backstory":{"description":"Backstory link URL to be added to the front page.","type":"string"},"cname":{"description":"Content of the './CNAME' file.","type":"string"},"contentDir":{"description":"Generated section content directory.","type":"string"},"description":{"type":"string"},"dir":{"type":"string"},"favicon":{"description":"Favicon URL.","type":"string"},"faviconType":{"type":"string"},"firstLineDescription":{"description":"Whether the first line following the main title is the package description.","type":"boolean"},"htmlTitle":{"type":"string"},"id":{"type":"string"},"isDevDep":{"description":"Whether the package installation instruction should include the \"-D\" flag.","type":"boolean"},"jsorg":{"description":"As a boolean, it means whether to add the '<package_name>.js.org' domain to the './CNAME' file.\n\nAs a string, it sets the '<jsorg_value>.js.org' domain to the './CNAME' file.","type":["boolean","string"]},"linkMap":{"additionalProperties":{"anyOf":[{"type":"string"},{"not":{}}]},"description":"Link substitution map.","type":"object"},"mainBranch":{"type":"string"},"name":{"type":"string"},"nav":{"description":"URL of an HTML file inserted into the navigation bar.","type":"string"},"npm":{"type":"string"},"prepend":{"$ref":"#/definitions/ContentInjectionMap"},"redirect":{"description":"Redirection URL.","type":"string"},"remove":{"description":"Whether to remove the GitHub Pages branch and quit.","type":"boolean"},"repo":{"type":"string"},"root":{"description":"Main page root path.","type":"string"},"singlePage":{"description":"Whether to show all sections on a single page.","type":"boolean"},"source":{"type":"string"},"targetBranch":{"description":"Target branch.","examples":["gh-pages"],"type":"string"},"title":{"type":"string"},"version":{"type":"string"},"ymid":{"type":["number","string"]}},"type":"object"},"Page":{"enum":["index","start","section","redirect"],"type":"string"}}}
|
|
@@ -15,7 +15,7 @@ const md = new Markdown({
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
export async function getParsedContent(ctx: Context) {
|
|
18
|
-
let { singlePage, firstLineDescription,
|
|
18
|
+
let { singlePage, firstLineDescription, linkMap } = ctx;
|
|
19
19
|
let rawContent = await fetchContent(
|
|
20
20
|
getLocation(ctx, "README.md", ctx.source),
|
|
21
21
|
);
|
|
@@ -97,12 +97,7 @@ export async function getParsedContent(ctx: Context) {
|
|
|
97
97
|
continue;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
intro.push(outerHTML);
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
indexComplete = true;
|
|
100
|
+
intro.push(outerHTML);
|
|
106
101
|
}
|
|
107
102
|
|
|
108
103
|
if (section.length !== 0) sections.push(joinLines(section));
|
package/src/css/index.css
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
body {
|
|
5
5
|
min-height: 100vh;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
7
|
.layout {
|
|
9
8
|
display: flex;
|
|
10
9
|
flex-direction: column;
|
|
@@ -13,6 +12,9 @@ body {
|
|
|
13
12
|
justify-content: center;
|
|
14
13
|
}
|
|
15
14
|
@media (max-width: 840px) {
|
|
15
|
+
:root {
|
|
16
|
+
--content-padding-x: 1.75rem;
|
|
17
|
+
}
|
|
16
18
|
.layout {
|
|
17
19
|
min-height: 100vh;
|
|
18
20
|
}
|
|
@@ -183,7 +185,10 @@ section.intro .section-content {
|
|
|
183
185
|
align-items: center;
|
|
184
186
|
}
|
|
185
187
|
section.intro .section-content {
|
|
186
|
-
padding-top: 0.
|
|
188
|
+
padding-top: 0.75rem;
|
|
189
|
+
}
|
|
190
|
+
section.intro pre {
|
|
191
|
+
margin: 1.75em 0;
|
|
187
192
|
}
|
|
188
193
|
}
|
|
189
194
|
.features {
|