@markdownspace/site-generator 1.0.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.
@@ -0,0 +1,14 @@
1
+ declare const _default: {
2
+ name: string;
3
+ category: string;
4
+ tags: string[];
5
+ description: string;
6
+ thumbnail: string;
7
+ preview: string;
8
+ css: string;
9
+ cssMin: string;
10
+ cssCdn: string;
11
+ scss: string;
12
+ scssVariables: string;
13
+ }[];
14
+ export default _default;
@@ -0,0 +1,18 @@
1
+ declare const _default: ({
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ cssFile: string;
6
+ route: string;
7
+ dataTheme: string;
8
+ isDarkMode?: undefined;
9
+ } | {
10
+ id: string;
11
+ name: string;
12
+ description: string;
13
+ cssFile: string;
14
+ route: string;
15
+ isDarkMode: boolean;
16
+ dataTheme: string;
17
+ })[];
18
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { parseFrontmatter } from './src/ParseFrontmatter';
2
+ export { parseFrontmatter };
3
+ /**
4
+ * Generates a website or web content from markdown documents.
5
+ *
6
+ * @param {Object} project - The project object containing base document information.
7
+ * @param {Object} doc - Document object containing specific details for the current document.
8
+ * @param {string | string[]} template - The template, or templates to prefix the current doc with.
9
+ * @param {string} rawMarkdown - The raw markdown content to be processed.
10
+ * @param {string} baseURL - The base URL for the site being generated.
11
+ * @returns {string} The final rendered website or web content.
12
+ */
13
+ declare const _default: {
14
+ generate(project: any, doc: any, templates: string[], rawMarkdown: any, baseURL: any): any;
15
+ };
16
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export { default } from './SiteGenerator';
2
+ export { parseFrontmatter } from './src/ParseFrontmatter';
3
+ export { default as AvailableBootstrapThemes } from './AvailableBootstrapThemes';
4
+ export { default as AvailableBulmaThemes } from './AvailableBulmaThemes';
@@ -0,0 +1,17 @@
1
+ import type { SiteData } from './types';
2
+ /**
3
+ * Generates the final data object with all necessary properties.
4
+ * @param {Object} frontmatter - The frontmatter data.
5
+ * @param {Object} doc - The document object.
6
+ * @param {string} baseURL - The base URL.
7
+ * @param {Object} project - The project object.
8
+ * @param {{ ssr: Object, csr: Object }} processedContent - The processed markdown content.
9
+ * @returns {Object} The final data object.
10
+ */
11
+ export declare function generateData({ frontmatter, doc, project, baseURL, processedContent, }: {
12
+ frontmatter: any;
13
+ doc: any;
14
+ project: any;
15
+ baseURL: any;
16
+ processedContent: any;
17
+ }): SiteData;
@@ -0,0 +1,12 @@
1
+ export declare function extractFrontmatter(markdown: any): any;
2
+ /**
3
+ * Parses frontmatter from a markdown string.
4
+ * @param {string} markdown - The markdown string to parse.
5
+ * @returns {Object} An object containing the parsed data and content.
6
+ */
7
+ export declare function parseFrontmatter(markdown: string): {
8
+ data: object;
9
+ content: string;
10
+ };
11
+ export declare function createFrontmatter(data: object): any;
12
+ export declare function updateMDFrontmatter(markdown: any, newFrontmatter: any): any;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Processes markdown content to SSR or CSR format.
3
+ * @param {string} markdown - The markdown string to process.
4
+ * @param {Object} frontmatter - The frontmatter data.
5
+ * @returns {{ ssr: Object, csr: Object }} An object containing SSR and CSR content.
6
+ */
7
+ export declare function processMarkdownContent(markdown: any, frontmatter: any): {
8
+ ssr: import("vfile").VFile;
9
+ csr: import("vfile").VFile | undefined;
10
+ } | undefined;
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_CSS_FRAMEWORK = "bulma";
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@markdownspace/site-generator",
3
+ "version": "1.0.0",
4
+ "description": "Turn markdown / MDX documents into complete websites. The site generation engine behind markdown.space.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist-types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist-types/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./dist/SiteGenerator": {
15
+ "types": "./dist-types/SiteGenerator.d.ts",
16
+ "import": "./dist/SiteGenerator.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "dist-types",
22
+ "README.md",
23
+ "LICENSE"
24
+ ],
25
+ "scripts": {
26
+ "test": "vitest run",
27
+ "test:w": "vitest",
28
+ "build": "node build.mjs && tsc -p tsconfig.types.json",
29
+ "build:w": "node build-watch.mjs",
30
+ "prepublishOnly": "npm run build"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/markdown-space/site-generator.git"
35
+ },
36
+ "keywords": [
37
+ "markdown",
38
+ "mdx",
39
+ "static-site-generator",
40
+ "website",
41
+ "mustache"
42
+ ],
43
+ "author": "Devon Bradley",
44
+ "license": "ISC",
45
+ "bugs": {
46
+ "url": "https://github.com/markdown-space/site-generator/issues"
47
+ },
48
+ "homepage": "https://github.com/markdown-space/site-generator#readme",
49
+ "dependencies": {
50
+ "@mdx-js/mdx": "^3.0.0",
51
+ "js-yaml": "^4.1.0",
52
+ "mustache": "^4.2.0",
53
+ "rehype-add-classes": "^1.0.0",
54
+ "rehype-highlight": "^7.0.0",
55
+ "rehype-raw": "^7.0.0",
56
+ "rehype-slug": "^6.0.0",
57
+ "rehype-stringify": "^10.0.0",
58
+ "rehype-wrap-all": "^1.1.0",
59
+ "remark-breaks": "^4.0.0",
60
+ "remark-gfm": "^4.0.0",
61
+ "remark-mdx": "^3.0.0",
62
+ "remark-parse": "^11.0.0",
63
+ "remark-rehype": "^11.0.0",
64
+ "unified": "^11.0.3",
65
+ "unist-util-remove": "^4.0.0"
66
+ },
67
+ "devDependencies": {
68
+ "esbuild": "^0.21.4",
69
+ "esbuild-plugin-polyfill-node": "^0.3.0",
70
+ "typescript": "^5.6.3",
71
+ "vitest": "^0.34.6"
72
+ }
73
+ }