@ox-content/napi 3.0.0-alpha.4 → 3.0.0-alpha.5
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/index.d.ts +24 -5
- package/index.js +1 -0
- package/package.json +8 -8
package/index.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export declare function generateSsgBareHtml(content: string, title: string): str
|
|
|
196
196
|
export declare function generateSsgBarePage(page: JsSsgBarePage): string
|
|
197
197
|
|
|
198
198
|
/** Generates SSG HTML page with navigation and search. */
|
|
199
|
-
export declare function generateSsgHtml(pageData: JsSsgPageData, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig):
|
|
199
|
+
export declare function generateSsgHtml(pageData: JsSsgPageData, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig): JsSsgHtmlResult
|
|
200
200
|
|
|
201
201
|
/** Returns unique git authors for a file. Empty when git is missing or fails. */
|
|
202
202
|
export declare function getGitContributors(filePath: string, root?: string | undefined | null): Array<JsGitContributor>
|
|
@@ -922,6 +922,12 @@ export interface JsGraphOptions {
|
|
|
922
922
|
externalPackageSources?: Array<JsExternalPackageSource>
|
|
923
923
|
}
|
|
924
924
|
|
|
925
|
+
/** One page-head validation finding. */
|
|
926
|
+
export interface JsHeadDiagnostic {
|
|
927
|
+
strict: boolean
|
|
928
|
+
message: string
|
|
929
|
+
}
|
|
930
|
+
|
|
925
931
|
/** Header nav link or dropdown. */
|
|
926
932
|
export interface JsHeaderNavItem {
|
|
927
933
|
/** Display label. */
|
|
@@ -1080,6 +1086,8 @@ export interface JsJsonLd {
|
|
|
1080
1086
|
publisher?: JsJsonLdPublisher
|
|
1081
1087
|
/** Site origin used for `@id` / `url`. */
|
|
1082
1088
|
siteUrl?: string
|
|
1089
|
+
pageType?: string
|
|
1090
|
+
graph?: Array<string>
|
|
1083
1091
|
}
|
|
1084
1092
|
|
|
1085
1093
|
/** Optional JSON-LD publisher. Only configured fields are emitted. */
|
|
@@ -1600,14 +1608,12 @@ export interface JsSsgBarePage {
|
|
|
1600
1608
|
|
|
1601
1609
|
/** SSG configuration. */
|
|
1602
1610
|
export interface JsSsgConfig {
|
|
1603
|
-
/** Site name. */
|
|
1604
1611
|
siteName: string
|
|
1605
|
-
/** Base URL path. */
|
|
1606
1612
|
base: string
|
|
1607
|
-
/** Optional site-root href for breadcrumbs. */
|
|
1608
1613
|
breadcrumbRootHref?: string
|
|
1609
|
-
/** OG image URL. */
|
|
1610
1614
|
ogImage?: string
|
|
1615
|
+
siteUrl?: string
|
|
1616
|
+
headValidation?: string
|
|
1611
1617
|
/** Theme configuration. */
|
|
1612
1618
|
theme?: JsThemeConfig
|
|
1613
1619
|
/** Current locale for this page. */
|
|
@@ -1660,6 +1666,12 @@ export interface JsSsgGeneratedHtmlPage {
|
|
|
1660
1666
|
html: string
|
|
1661
1667
|
}
|
|
1662
1668
|
|
|
1669
|
+
/** Themed SSG HTML plus page-head diagnostics. */
|
|
1670
|
+
export interface JsSsgHtmlResult {
|
|
1671
|
+
html: string
|
|
1672
|
+
diagnostics: Array<JsHeadDiagnostic>
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1663
1675
|
/** Navigation group for SSG. */
|
|
1664
1676
|
export interface JsSsgNavGroup {
|
|
1665
1677
|
/** Group title. */
|
|
@@ -1724,6 +1736,10 @@ export interface JsSsgPageData {
|
|
|
1724
1736
|
layout?: string
|
|
1725
1737
|
/** Per-page chrome flags. Honored only when page chrome is enabled. */
|
|
1726
1738
|
chrome?: JsPageChromeFlags
|
|
1739
|
+
/** Frontmatter `robots`. */
|
|
1740
|
+
robots?: string
|
|
1741
|
+
/** Frontmatter `canonical`. */
|
|
1742
|
+
canonical?: string
|
|
1727
1743
|
}
|
|
1728
1744
|
|
|
1729
1745
|
/** Resolved SSG output and public route paths. */
|
|
@@ -2371,6 +2387,9 @@ export declare function render(astJson: string): RenderResult
|
|
|
2371
2387
|
*/
|
|
2372
2388
|
export declare function renderFrameworkComponentCode(html: string, target: string, islands?: Array<JsFrameworkComponentIsland> | undefined | null, mode?: string | undefined | null): string
|
|
2373
2389
|
|
|
2390
|
+
/** Resolve Unhead-compatible page-head descriptors to HTML. */
|
|
2391
|
+
export declare function renderHead(inputJson: string): JsSsgHtmlResult
|
|
2392
|
+
|
|
2374
2393
|
/** Render result containing the HTML output. */
|
|
2375
2394
|
export interface RenderResult {
|
|
2376
2395
|
/** The rendered HTML. */
|
package/index.js
CHANGED
|
@@ -209,6 +209,7 @@ module.exports.generateSearchModuleFromOptions = binding.generateSearchModuleFro
|
|
|
209
209
|
module.exports.collectSearchMarkdownFiles = binding.collectSearchMarkdownFiles;
|
|
210
210
|
module.exports.normalizeVitePressFrontmatter = binding.normalizeVitePressFrontmatter;
|
|
211
211
|
module.exports.generateSsgHtml = binding.generateSsgHtml;
|
|
212
|
+
module.exports.renderHead = binding.renderHead;
|
|
212
213
|
module.exports.generateSsgBareHtml = binding.generateSsgBareHtml;
|
|
213
214
|
module.exports.highlightCodeBlock = binding.highlightCodeBlock;
|
|
214
215
|
module.exports.applyPendingHighlights = binding.applyPendingHighlights;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ox-content/napi",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.5",
|
|
4
4
|
"description": "Node.js bindings for Ox Content - High-performance Markdown parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@ox-content/binding-darwin-x64": "3.0.0-alpha.
|
|
51
|
-
"@ox-content/binding-darwin-arm64": "3.0.0-alpha.
|
|
52
|
-
"@ox-content/binding-linux-x64-gnu": "3.0.0-alpha.
|
|
53
|
-
"@ox-content/binding-linux-x64-musl": "3.0.0-alpha.
|
|
54
|
-
"@ox-content/binding-linux-arm64-gnu": "3.0.0-alpha.
|
|
55
|
-
"@ox-content/binding-linux-arm64-musl": "3.0.0-alpha.
|
|
56
|
-
"@ox-content/binding-win32-x64-msvc": "3.0.0-alpha.
|
|
50
|
+
"@ox-content/binding-darwin-x64": "3.0.0-alpha.5",
|
|
51
|
+
"@ox-content/binding-darwin-arm64": "3.0.0-alpha.5",
|
|
52
|
+
"@ox-content/binding-linux-x64-gnu": "3.0.0-alpha.5",
|
|
53
|
+
"@ox-content/binding-linux-x64-musl": "3.0.0-alpha.5",
|
|
54
|
+
"@ox-content/binding-linux-arm64-gnu": "3.0.0-alpha.5",
|
|
55
|
+
"@ox-content/binding-linux-arm64-musl": "3.0.0-alpha.5",
|
|
56
|
+
"@ox-content/binding-win32-x64-msvc": "3.0.0-alpha.5"
|
|
57
57
|
}
|
|
58
58
|
}
|