lildocs 0.1.12 → 0.1.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/dist/cli.mjs +16 -4
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -804,6 +804,13 @@ async function buildReferencePages(options) {
|
|
|
804
804
|
try {
|
|
805
805
|
await generateMarkdownForModule(packageJson.packagePath, {
|
|
806
806
|
cwd: options.cwd,
|
|
807
|
+
propertyDocs: "list",
|
|
808
|
+
groupBySyntax: true,
|
|
809
|
+
sortByName: true,
|
|
810
|
+
github: options.githubRepository ? {
|
|
811
|
+
repository: options.githubRepository,
|
|
812
|
+
searchLinks: true
|
|
813
|
+
} : void 0,
|
|
807
814
|
outDir: tempDir
|
|
808
815
|
});
|
|
809
816
|
const markdownPaths = await collectMarkdownPaths(tempDir);
|
|
@@ -1626,15 +1633,16 @@ async function buildSite(options) {
|
|
|
1626
1633
|
});
|
|
1627
1634
|
const outDir = path.resolve(options.cwd, options.outDir);
|
|
1628
1635
|
const outDirName = path.basename(outDir);
|
|
1636
|
+
const packagePath = await findNearestPackageJson(input.docsRoot, options.cwd);
|
|
1637
|
+
const repositoryUrl = await resolveRepositoryUrl(packagePath);
|
|
1638
|
+
const packageName = await resolvePackageName(packagePath);
|
|
1629
1639
|
const referencePages = await buildReferencePages({
|
|
1630
1640
|
cwd: options.cwd,
|
|
1631
1641
|
docsRoot: input.docsRoot,
|
|
1632
|
-
reference: configOptions.reference
|
|
1642
|
+
reference: configOptions.reference,
|
|
1643
|
+
githubRepository: githubRepositoryName(repositoryUrl)
|
|
1633
1644
|
});
|
|
1634
1645
|
const model = await buildContentModel(input, outDirName, configOptions.navigation.order, referencePages);
|
|
1635
|
-
const packagePath = await findNearestPackageJson(input.docsRoot, options.cwd);
|
|
1636
|
-
const repositoryUrl = await resolveRepositoryUrl(packagePath);
|
|
1637
|
-
const packageName = await resolvePackageName(packagePath);
|
|
1638
1646
|
const projectName = configOptions.projectName ?? packageName;
|
|
1639
1647
|
const theme = await resolveTheme({
|
|
1640
1648
|
docsRoot: input.docsRoot,
|
|
@@ -1758,6 +1766,10 @@ function normalizeGitHubRepository(value) {
|
|
|
1758
1766
|
const urlMatch = /^(?:git\+)?https:\/\/github\.com\/([^/]+\/[^/#?]+?)(?:\.git)?(?:[#?].*)?$/.exec(repository);
|
|
1759
1767
|
if (urlMatch?.[1]) return `https://github.com/${urlMatch[1]}`;
|
|
1760
1768
|
}
|
|
1769
|
+
function githubRepositoryName(repositoryUrl) {
|
|
1770
|
+
if (!repositoryUrl) return;
|
|
1771
|
+
return /^https:\/\/github\.com\/([^/]+\/[^/]+)$/.exec(repositoryUrl)?.[1];
|
|
1772
|
+
}
|
|
1761
1773
|
async function readRenderAsset(name) {
|
|
1762
1774
|
const bundledPath = path.resolve(sourceDir, "render", name);
|
|
1763
1775
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lildocs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "A lightweight CLI that turns Markdown docs into a static searchable documentation site.",
|
|
5
5
|
"homepage": "https://aleclarson.github.io/lildocs/",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"beautiful-mermaid": "^1.1.3",
|
|
30
30
|
"cmd-ts": "^0.15.0",
|
|
31
31
|
"culori": "^4.0.2",
|
|
32
|
-
"exports-md": "^0.2.
|
|
32
|
+
"exports-md": "^0.2.3",
|
|
33
33
|
"gray-matter": "^4.0.3",
|
|
34
34
|
"marked": "^18.0.3",
|
|
35
35
|
"marked-shiki": "^1.2.1",
|