lildocs 0.1.12 → 0.1.13
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 +14 -4
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -804,6 +804,11 @@ async function buildReferencePages(options) {
|
|
|
804
804
|
try {
|
|
805
805
|
await generateMarkdownForModule(packageJson.packagePath, {
|
|
806
806
|
cwd: options.cwd,
|
|
807
|
+
propertyDocs: "list",
|
|
808
|
+
github: options.githubRepository ? {
|
|
809
|
+
repository: options.githubRepository,
|
|
810
|
+
searchLinks: true
|
|
811
|
+
} : void 0,
|
|
807
812
|
outDir: tempDir
|
|
808
813
|
});
|
|
809
814
|
const markdownPaths = await collectMarkdownPaths(tempDir);
|
|
@@ -1626,15 +1631,16 @@ async function buildSite(options) {
|
|
|
1626
1631
|
});
|
|
1627
1632
|
const outDir = path.resolve(options.cwd, options.outDir);
|
|
1628
1633
|
const outDirName = path.basename(outDir);
|
|
1634
|
+
const packagePath = await findNearestPackageJson(input.docsRoot, options.cwd);
|
|
1635
|
+
const repositoryUrl = await resolveRepositoryUrl(packagePath);
|
|
1636
|
+
const packageName = await resolvePackageName(packagePath);
|
|
1629
1637
|
const referencePages = await buildReferencePages({
|
|
1630
1638
|
cwd: options.cwd,
|
|
1631
1639
|
docsRoot: input.docsRoot,
|
|
1632
|
-
reference: configOptions.reference
|
|
1640
|
+
reference: configOptions.reference,
|
|
1641
|
+
githubRepository: githubRepositoryName(repositoryUrl)
|
|
1633
1642
|
});
|
|
1634
1643
|
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
1644
|
const projectName = configOptions.projectName ?? packageName;
|
|
1639
1645
|
const theme = await resolveTheme({
|
|
1640
1646
|
docsRoot: input.docsRoot,
|
|
@@ -1758,6 +1764,10 @@ function normalizeGitHubRepository(value) {
|
|
|
1758
1764
|
const urlMatch = /^(?:git\+)?https:\/\/github\.com\/([^/]+\/[^/#?]+?)(?:\.git)?(?:[#?].*)?$/.exec(repository);
|
|
1759
1765
|
if (urlMatch?.[1]) return `https://github.com/${urlMatch[1]}`;
|
|
1760
1766
|
}
|
|
1767
|
+
function githubRepositoryName(repositoryUrl) {
|
|
1768
|
+
if (!repositoryUrl) return;
|
|
1769
|
+
return /^https:\/\/github\.com\/([^/]+\/[^/]+)$/.exec(repositoryUrl)?.[1];
|
|
1770
|
+
}
|
|
1761
1771
|
async function readRenderAsset(name) {
|
|
1762
1772
|
const bundledPath = path.resolve(sourceDir, "render", name);
|
|
1763
1773
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lildocs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
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.2",
|
|
33
33
|
"gray-matter": "^4.0.3",
|
|
34
34
|
"marked": "^18.0.3",
|
|
35
35
|
"marked-shiki": "^1.2.1",
|