bunki 0.19.4 → 0.19.6
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.js +37 -1
- package/dist/generators/pages.d.ts +6 -0
- package/dist/types.d.ts +2 -0
- package/package.json +3 -2
package/dist/cli.js
CHANGED
|
@@ -35260,6 +35260,7 @@ async function parseMarkdownFile(filePath, cdnConfig) {
|
|
|
35260
35260
|
url: `/${postYear}/${slug}/`,
|
|
35261
35261
|
excerpt: data.excerpt || extractExcerpt(content),
|
|
35262
35262
|
html: sanitizedHtml,
|
|
35263
|
+
...data.seoTitle && { seoTitle: data.seoTitle },
|
|
35263
35264
|
...data.category && { category: data.category },
|
|
35264
35265
|
...data.business && {
|
|
35265
35266
|
business: (() => {
|
|
@@ -36142,6 +36143,9 @@ async function generate404Page(config, outputDir) {
|
|
|
36142
36143
|
async function generateMapPage(site, config, outputDir) {
|
|
36143
36144
|
await generateOptionalPage("map.njk", { site: config, posts: site.posts }, outputDir, "map/index.html", "map page");
|
|
36144
36145
|
}
|
|
36146
|
+
async function generatePrivacyPage(config, outputDir) {
|
|
36147
|
+
await generateOptionalPage("privacy.njk", { site: config }, outputDir, "privacy/index.html", "privacy page");
|
|
36148
|
+
}
|
|
36145
36149
|
|
|
36146
36150
|
// src/generators/assets.ts
|
|
36147
36151
|
var {Glob: Glob2 } = globalThis.Bun;
|
|
@@ -36301,8 +36305,39 @@ function createTemplateEngine(templatesDir, watch = false) {
|
|
|
36301
36305
|
watch
|
|
36302
36306
|
});
|
|
36303
36307
|
env.addFilter("date", formatDate);
|
|
36308
|
+
env.addFilter("titlecase", titleCase);
|
|
36304
36309
|
return env;
|
|
36305
36310
|
}
|
|
36311
|
+
var TECH_ACRONYMS = new Set([
|
|
36312
|
+
"ai",
|
|
36313
|
+
"llm",
|
|
36314
|
+
"api",
|
|
36315
|
+
"ui",
|
|
36316
|
+
"ux",
|
|
36317
|
+
"ios",
|
|
36318
|
+
"url",
|
|
36319
|
+
"seo",
|
|
36320
|
+
"css",
|
|
36321
|
+
"html",
|
|
36322
|
+
"js",
|
|
36323
|
+
"ts",
|
|
36324
|
+
"sql",
|
|
36325
|
+
"cdn",
|
|
36326
|
+
"aws",
|
|
36327
|
+
"rss",
|
|
36328
|
+
"sdk",
|
|
36329
|
+
"cli",
|
|
36330
|
+
"gpu",
|
|
36331
|
+
"cpu"
|
|
36332
|
+
]);
|
|
36333
|
+
function titleCase(str2) {
|
|
36334
|
+
return str2.replace(/-/g, " ").split(" ").map((word) => {
|
|
36335
|
+
const lower = word.toLowerCase();
|
|
36336
|
+
if (TECH_ACRONYMS.has(lower))
|
|
36337
|
+
return lower === "ios" ? "iOS" : lower.toUpperCase();
|
|
36338
|
+
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
36339
|
+
}).join(" ");
|
|
36340
|
+
}
|
|
36306
36341
|
function formatDate(date, format) {
|
|
36307
36342
|
const d2 = toPacificTime(date);
|
|
36308
36343
|
const month = DATE.MONTHS[d2.getMonth()];
|
|
@@ -36446,7 +36481,8 @@ Move any files from content/_assets/ into the correct year folder and retry.`);
|
|
|
36446
36481
|
generateTagPages(this.site, this.options.config, this.options.outputDir),
|
|
36447
36482
|
generateYearArchives(this.site, this.options.config, this.options.outputDir),
|
|
36448
36483
|
generateMapPage(this.site, this.options.config, this.options.outputDir),
|
|
36449
|
-
generate404Page(this.options.config, this.options.outputDir)
|
|
36484
|
+
generate404Page(this.options.config, this.options.outputDir),
|
|
36485
|
+
generatePrivacyPage(this.options.config, this.options.outputDir)
|
|
36450
36486
|
]);
|
|
36451
36487
|
this.metrics.startStage("assetCopying");
|
|
36452
36488
|
await copyStaticAssets(this.options.templatesDir, this.options.outputDir);
|
|
@@ -46,3 +46,9 @@ export declare function generate404Page(config: SiteConfig, outputDir: string):
|
|
|
46
46
|
* @param outputDir - Output directory
|
|
47
47
|
*/
|
|
48
48
|
export declare function generateMapPage(site: Site, config: SiteConfig, outputDir: string): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Generate privacy policy page (optional)
|
|
51
|
+
* @param config - Site configuration
|
|
52
|
+
* @param outputDir - Output directory
|
|
53
|
+
*/
|
|
54
|
+
export declare function generatePrivacyPage(config: SiteConfig, outputDir: string): Promise<void>;
|
package/dist/types.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export interface Post {
|
|
|
64
64
|
business?: Business;
|
|
65
65
|
/** Optional image URL (first image from post content, used for thumbnails and social sharing) */
|
|
66
66
|
image?: string;
|
|
67
|
+
/** Optional short title for SEO title tag (50–65 chars). Falls back to title if not set. */
|
|
68
|
+
seoTitle?: string;
|
|
67
69
|
/** Word count calculated from content (used for reading time and schema.org) */
|
|
68
70
|
wordCount?: number;
|
|
69
71
|
/** Cached JSON-LD structured data (pre-generated during initialization) */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunki",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.6",
|
|
4
4
|
"description": "An opinionated static site generator built with Bun featuring PostCSS integration and modern web development workflows",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"test:watch": "bun test --watch",
|
|
15
15
|
"format": "prettier --write .",
|
|
16
16
|
"format:check": "prettier --check .",
|
|
17
|
+
"prepare": "husky",
|
|
17
18
|
"lint-staged": "lint-staged",
|
|
18
19
|
"typecheck": "bun tsc --noEmit",
|
|
19
20
|
"clean": "rm -rf dist coverage",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"marked-alert": "^2.1.2",
|
|
54
55
|
"marked-highlight": "^2.2.3",
|
|
55
56
|
"nunjucks": "^3.2.4",
|
|
56
|
-
"postcss": "^8.
|
|
57
|
+
"postcss": "^8.5.8",
|
|
57
58
|
"postcss-cli": "^11.0.1",
|
|
58
59
|
"sanitize-html": "2.17.2",
|
|
59
60
|
"slugify": "^1.6.8"
|