@ox-content/napi 2.87.0 → 2.89.0
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 +34 -0
- package/index.js +1 -0
- package/package.json +8 -8
package/index.d.ts
CHANGED
|
@@ -178,6 +178,9 @@ export declare function generateSearchModuleFromOptions(options: JsSearchRuntime
|
|
|
178
178
|
/** Generates a bare SSG HTML page without navigation or styles. */
|
|
179
179
|
export declare function generateSsgBareHtml(content: string, title: string): string
|
|
180
180
|
|
|
181
|
+
/** Generates a bare SSG HTML page carrying head metadata and injected markup. */
|
|
182
|
+
export declare function generateSsgBarePage(page: JsSsgBarePage): string
|
|
183
|
+
|
|
181
184
|
/** Generates SSG HTML page with navigation and search. */
|
|
182
185
|
export declare function generateSsgHtml(pageData: JsSsgPageData, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig): string
|
|
183
186
|
|
|
@@ -1250,6 +1253,37 @@ export interface JsSourceOrigin {
|
|
|
1250
1253
|
column: number
|
|
1251
1254
|
}
|
|
1252
1255
|
|
|
1256
|
+
/**
|
|
1257
|
+
* Head metadata and injected markup for a bare SSG page.
|
|
1258
|
+
*
|
|
1259
|
+
* Every field is optional. A value with none of them set renders the same
|
|
1260
|
+
* document bare mode emitted before any of this existed.
|
|
1261
|
+
*/
|
|
1262
|
+
export interface JsSsgBarePage {
|
|
1263
|
+
/** Page title. */
|
|
1264
|
+
title: string
|
|
1265
|
+
/** Rendered page body. */
|
|
1266
|
+
content: string
|
|
1267
|
+
/** `lang` attribute. Defaults to `en`. */
|
|
1268
|
+
lang?: string
|
|
1269
|
+
/** `dir` attribute. Omitted when absent. */
|
|
1270
|
+
dir?: string
|
|
1271
|
+
/** Page description for `description` and the OG/Twitter variants. */
|
|
1272
|
+
description?: string
|
|
1273
|
+
/** Absolute page URL for `<link rel="canonical">` and `og:url`. */
|
|
1274
|
+
canonicalUrl?: string
|
|
1275
|
+
/** Site name for `og:site_name`. */
|
|
1276
|
+
siteName?: string
|
|
1277
|
+
/** Image URL for `og:image` and `twitter:image`. */
|
|
1278
|
+
ogImage?: string
|
|
1279
|
+
/** Raw markup appended to `<head>`. */
|
|
1280
|
+
head?: string
|
|
1281
|
+
/** Raw markup inserted directly after `<body>`. */
|
|
1282
|
+
bodyStart?: string
|
|
1283
|
+
/** Raw markup inserted directly before `</body>`. */
|
|
1284
|
+
bodyEnd?: string
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1253
1287
|
/** SSG configuration. */
|
|
1254
1288
|
export interface JsSsgConfig {
|
|
1255
1289
|
/** Site name. */
|
package/index.js
CHANGED
|
@@ -209,6 +209,7 @@ module.exports.collectSearchMarkdownFiles = binding.collectSearchMarkdownFiles;
|
|
|
209
209
|
module.exports.normalizeVitePressFrontmatter = binding.normalizeVitePressFrontmatter;
|
|
210
210
|
module.exports.generateSsgHtml = binding.generateSsgHtml;
|
|
211
211
|
module.exports.generateSsgBareHtml = binding.generateSsgBareHtml;
|
|
212
|
+
module.exports.generateSsgBarePage = binding.generateSsgBarePage;
|
|
212
213
|
module.exports.getGitLastUpdated = binding.getGitLastUpdated;
|
|
213
214
|
module.exports.resolveSsgRoutePaths = binding.resolveSsgRoutePaths;
|
|
214
215
|
module.exports.getSsgOutputPath = binding.getSsgOutputPath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ox-content/napi",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.89.0",
|
|
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": "2.
|
|
51
|
-
"@ox-content/binding-darwin-arm64": "2.
|
|
52
|
-
"@ox-content/binding-linux-x64-gnu": "2.
|
|
53
|
-
"@ox-content/binding-linux-x64-musl": "2.
|
|
54
|
-
"@ox-content/binding-linux-arm64-gnu": "2.
|
|
55
|
-
"@ox-content/binding-linux-arm64-musl": "2.
|
|
56
|
-
"@ox-content/binding-win32-x64-msvc": "2.
|
|
50
|
+
"@ox-content/binding-darwin-x64": "2.89.0",
|
|
51
|
+
"@ox-content/binding-darwin-arm64": "2.89.0",
|
|
52
|
+
"@ox-content/binding-linux-x64-gnu": "2.89.0",
|
|
53
|
+
"@ox-content/binding-linux-x64-musl": "2.89.0",
|
|
54
|
+
"@ox-content/binding-linux-arm64-gnu": "2.89.0",
|
|
55
|
+
"@ox-content/binding-linux-arm64-musl": "2.89.0",
|
|
56
|
+
"@ox-content/binding-win32-x64-msvc": "2.89.0"
|
|
57
57
|
}
|
|
58
58
|
}
|