bunki 0.16.2 → 0.17.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/README.md +141 -15
- package/dist/cli/commands/templates/archive-njk.d.ts +4 -0
- package/dist/cli/commands/templates/base-njk.d.ts +4 -0
- package/dist/cli/commands/templates/default-css.d.ts +4 -0
- package/dist/cli/commands/templates/index-njk.d.ts +4 -0
- package/dist/cli/commands/templates/index.d.ts +14 -0
- package/dist/cli/commands/templates/post-njk.d.ts +4 -0
- package/dist/cli/commands/templates/sample-post.d.ts +4 -0
- package/dist/cli/commands/templates/tag-njk.d.ts +4 -0
- package/dist/cli/commands/templates/tags-njk.d.ts +4 -0
- package/dist/cli/commands/validate.d.ts +0 -3
- package/dist/cli.js +1636 -1530
- package/dist/generators/assets.d.ts +16 -0
- package/dist/generators/feeds.d.ts +32 -0
- package/dist/generators/pages.d.ts +48 -0
- package/dist/index.js +913 -830
- package/dist/site-generator.d.ts +22 -22
- package/dist/utils/build-metrics.d.ts +52 -0
- package/dist/utils/css-processor.d.ts +10 -1
- package/dist/utils/markdown/constants.d.ts +16 -0
- package/dist/utils/markdown/parser.d.ts +32 -0
- package/dist/utils/markdown/validators.d.ts +31 -0
- package/dist/utils/markdown-utils.d.ts +16 -11
- package/dist/utils/pagination.d.ts +38 -0
- package/dist/utils/xml-builder.d.ts +42 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset generation - CSS and static file copying
|
|
3
|
+
*/
|
|
4
|
+
import type { SiteConfig } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Generate stylesheet using PostCSS or fallback to direct copy
|
|
7
|
+
* @param config - Site configuration
|
|
8
|
+
* @param outputDir - Output directory
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateStylesheet(config: SiteConfig, outputDir: string): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Copy static assets from templates/assets and public/ directories
|
|
13
|
+
* @param templatesDir - Templates directory
|
|
14
|
+
* @param outputDir - Output directory
|
|
15
|
+
*/
|
|
16
|
+
export declare function copyStaticAssets(templatesDir: string, outputDir: string): Promise<void>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RSS feed and sitemap generation
|
|
3
|
+
*/
|
|
4
|
+
import type { Site, SiteConfig } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Generate RSS feed XML
|
|
7
|
+
* @param site - Site data
|
|
8
|
+
* @param config - Site configuration
|
|
9
|
+
* @param outputDir - Output directory path
|
|
10
|
+
* @returns RSS feed XML content
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateRSSFeed(site: Site, config: SiteConfig): string;
|
|
13
|
+
/**
|
|
14
|
+
* Generate sitemap XML
|
|
15
|
+
* @param site - Site data
|
|
16
|
+
* @param config - Site configuration
|
|
17
|
+
* @param pageSize - Items per page for pagination
|
|
18
|
+
* @returns Sitemap XML content
|
|
19
|
+
*/
|
|
20
|
+
export declare function generateSitemap(site: Site, config: SiteConfig, pageSize?: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Generate sitemap index XML (for large sites)
|
|
23
|
+
* @param config - Site configuration
|
|
24
|
+
* @returns Sitemap index XML content
|
|
25
|
+
*/
|
|
26
|
+
export declare function generateSitemapIndex(config: SiteConfig): string;
|
|
27
|
+
/**
|
|
28
|
+
* Generate robots.txt content
|
|
29
|
+
* @param config - Site configuration
|
|
30
|
+
* @returns robots.txt content
|
|
31
|
+
*/
|
|
32
|
+
export declare function generateRobotsTxt(config: SiteConfig): string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page generation logic
|
|
3
|
+
*/
|
|
4
|
+
import type { Site, SiteConfig } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Generate homepage with pagination
|
|
7
|
+
* @param site - Site data
|
|
8
|
+
* @param config - Site configuration
|
|
9
|
+
* @param outputDir - Output directory
|
|
10
|
+
* @param pageSize - Items per page
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateIndexPages(site: Site, config: SiteConfig, outputDir: string, pageSize?: number): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Generate individual post pages
|
|
15
|
+
* @param site - Site data
|
|
16
|
+
* @param config - Site configuration
|
|
17
|
+
* @param outputDir - Output directory
|
|
18
|
+
*/
|
|
19
|
+
export declare function generatePostPages(site: Site, config: SiteConfig, outputDir: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Generate tag pages with pagination
|
|
22
|
+
* @param site - Site data
|
|
23
|
+
* @param config - Site configuration
|
|
24
|
+
* @param outputDir - Output directory
|
|
25
|
+
* @param pageSize - Items per page
|
|
26
|
+
*/
|
|
27
|
+
export declare function generateTagPages(site: Site, config: SiteConfig, outputDir: string, pageSize?: number): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Generate year archive pages with pagination
|
|
30
|
+
* @param site - Site data
|
|
31
|
+
* @param config - Site configuration
|
|
32
|
+
* @param outputDir - Output directory
|
|
33
|
+
* @param pageSize - Items per page
|
|
34
|
+
*/
|
|
35
|
+
export declare function generateYearArchives(site: Site, config: SiteConfig, outputDir: string, pageSize?: number): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Generate 404 error page (optional)
|
|
38
|
+
* @param config - Site configuration
|
|
39
|
+
* @param outputDir - Output directory
|
|
40
|
+
*/
|
|
41
|
+
export declare function generate404Page(config: SiteConfig, outputDir: string): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Generate map page (optional)
|
|
44
|
+
* @param site - Site data
|
|
45
|
+
* @param config - Site configuration
|
|
46
|
+
* @param outputDir - Output directory
|
|
47
|
+
*/
|
|
48
|
+
export declare function generateMapPage(site: Site, config: SiteConfig, outputDir: string): Promise<void>;
|