docula 0.3.7 → 0.5.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 +108 -39
- package/bin/docula.mjs +8 -0
- package/dist/builder.d.ts +35 -0
- package/dist/builder.js +201 -0
- package/dist/builder.js.map +1 -0
- package/dist/console.d.ts +22 -0
- package/dist/console.js +120 -0
- package/dist/console.js.map +1 -0
- package/dist/docula.d.ts +22 -22
- package/dist/docula.js +119 -174
- package/dist/docula.js.map +1 -1
- package/dist/github.d.ts +22 -0
- package/dist/github.js +74 -0
- package/dist/github.js.map +1 -0
- package/dist/helpers.d.ts +7 -0
- package/dist/helpers.js +58 -0
- package/dist/helpers.js.map +1 -0
- package/dist/options.d.ts +12 -0
- package/dist/options.js +47 -0
- package/dist/options.js.map +1 -0
- package/init/docula.config.cjs +10 -0
- package/init/favicon.ico +0 -0
- package/init/logo.png +0 -0
- package/init/variables.css +30 -0
- package/package.json +57 -94
- package/{templates/default/assets/css/styles → template/css}/home.css +20 -18
- package/{init/_includes/assets/css/styles → template/css}/index.css +7 -0
- package/template/includes/footer.hbs +10 -0
- package/template/includes/header.hbs +17 -0
- package/template/includes/landing/content.hbs +63 -0
- package/template/includes/landing/hero.hbs +3 -0
- package/template/includes/scripts.hbs +4 -0
- package/template/index.hbs +16 -0
- package/template/releases.hbs +45 -0
- package/bin/docula.js +0 -7
- package/dist/config.d.ts +0 -21
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -78
- package/dist/config.js.map +0 -1
- package/dist/docula-plugin.d.ts +0 -9
- package/dist/docula-plugin.d.ts.map +0 -1
- package/dist/docula-plugin.js +0 -2
- package/dist/docula-plugin.js.map +0 -1
- package/dist/docula.d.ts.map +0 -1
- package/dist/eleventy/filters.d.ts +0 -2
- package/dist/eleventy/filters.d.ts.map +0 -1
- package/dist/eleventy/filters.js +0 -10
- package/dist/eleventy/filters.js.map +0 -1
- package/dist/eleventy/global-data.d.ts +0 -3
- package/dist/eleventy/global-data.d.ts.map +0 -1
- package/dist/eleventy/global-data.js +0 -2
- package/dist/eleventy/global-data.js.map +0 -1
- package/dist/eleventy/shortcodes.d.ts +0 -4
- package/dist/eleventy/shortcodes.d.ts.map +0 -1
- package/dist/eleventy/shortcodes.js +0 -18
- package/dist/eleventy/shortcodes.js.map +0 -1
- package/dist/eleventy.d.ts +0 -24
- package/dist/eleventy.d.ts.map +0 -1
- package/dist/eleventy.js +0 -82
- package/dist/eleventy.js.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -67
- package/dist/index.js.map +0 -1
- package/dist/logger.d.ts +0 -4
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js +0 -20
- package/dist/logger.js.map +0 -1
- package/dist/plugins/algolia.d.ts +0 -21
- package/dist/plugins/algolia.d.ts.map +0 -1
- package/dist/plugins/algolia.js +0 -54
- package/dist/plugins/algolia.js.map +0 -1
- package/dist/plugins/github.d.ts +0 -16
- package/dist/plugins/github.d.ts.map +0 -1
- package/dist/plugins/github.js +0 -68
- package/dist/plugins/github.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -18
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js +0 -16
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/npm.d.ts +0 -14
- package/dist/plugins/npm.d.ts.map +0 -1
- package/dist/plugins/npm.js +0 -36
- package/dist/plugins/npm.js.map +0 -1
- package/dist/plugins/pagefind.d.ts +0 -10
- package/dist/plugins/pagefind.d.ts.map +0 -1
- package/dist/plugins/pagefind.js +0 -22
- package/dist/plugins/pagefind.js.map +0 -1
- package/dist/plugins/robots.d.ts +0 -14
- package/dist/plugins/robots.d.ts.map +0 -1
- package/dist/plugins/robots.js +0 -34
- package/dist/plugins/robots.js.map +0 -1
- package/dist/plugins/sitemap.d.ts +0 -11
- package/dist/plugins/sitemap.d.ts.map +0 -1
- package/dist/plugins/sitemap.js +0 -27
- package/dist/plugins/sitemap.js.map +0 -1
- package/dist/schemas.d.ts +0 -21
- package/dist/schemas.d.ts.map +0 -1
- package/dist/schemas.js +0 -25
- package/dist/schemas.js.map +0 -1
- package/dist/tools/__mocks__/inquirer-prompt.d.ts +0 -20
- package/dist/tools/__mocks__/inquirer-prompt.d.ts.map +0 -1
- package/dist/tools/__mocks__/inquirer-prompt.js +0 -19
- package/dist/tools/__mocks__/inquirer-prompt.js.map +0 -1
- package/dist/tools/__mocks__/path.d.ts +0 -5
- package/dist/tools/__mocks__/path.d.ts.map +0 -1
- package/dist/tools/__mocks__/path.js +0 -7
- package/dist/tools/__mocks__/path.js.map +0 -1
- package/dist/tools/inquirer-prompt.d.ts +0 -11
- package/dist/tools/inquirer-prompt.d.ts.map +0 -1
- package/dist/tools/inquirer-prompt.js +0 -139
- package/dist/tools/inquirer-prompt.js.map +0 -1
- package/dist/tools/path.d.ts +0 -4
- package/dist/tools/path.d.ts.map +0 -1
- package/dist/tools/path.js +0 -6
- package/dist/tools/path.js.map +0 -1
- package/dist/tools/tools.d.ts +0 -3
- package/dist/tools/tools.d.ts.map +0 -1
- package/dist/tools/tools.js +0 -10
- package/dist/tools/tools.js.map +0 -1
- package/dist/types/config.d.ts +0 -8
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/config.js +0 -2
- package/dist/types/config.js.map +0 -1
- package/init/_data/site.json +0 -5
- package/init/_includes/assets/css/styles/home.css +0 -305
- package/init/_includes/assets/css/styles/search/algolia.css +0 -125
- package/init/_includes/assets/css/styles/search/pagefind.css +0 -60
- package/init/_includes/assets/css/styles/variables.css +0 -30
- package/init/_includes/assets/images/docula-logo-horizontal.webp +0 -0
- package/init/_includes/assets/images/logo.svg +0 -10
- package/init/_includes/doc.njk +0 -22
- package/init/_includes/landing/landingHero.njk +0 -8
- package/init/_includes/landing/singlePage.njk +0 -24
- package/init/_includes/multipage/header.njk +0 -23
- package/init/_includes/multipage/homeHeader.njk +0 -20
- package/init/_includes/multipage/main.njk +0 -47
- package/init/_includes/multipage/scripts.njk +0 -47
- package/init/_includes/multipage/searchEngine.njk +0 -5
- package/init/_includes/multipage/searchModal.njk +0 -19
- package/init/_includes/multipage/sidebar.njk +0 -50
- package/init/_includes/search/algolia.njk +0 -98
- package/init/_includes/search/pagefind.njk +0 -66
- package/init/_includes/shared/footer.njk +0 -4
- package/init/_includes/shared/head.njk +0 -15
- package/init/_includes/shared/highlightScript.njk +0 -6
- package/init/_includes/shared/homeData.njk +0 -49
- package/init/api/Readme.md +0 -3
- package/init/docs/Readme.md +0 -83
- package/init/docs/docs.json +0 -13
- package/init/index.njk +0 -28
- package/init/releases.njk +0 -38
- package/init/search-index.md +0 -14
- package/init/versions.njk +0 -40
- package/templates/default/assets/css/highlight/highlight.min.js +0 -1433
- package/templates/default/assets/css/highlight/styles/base16/dracula.min.css +0 -7
- package/templates/default/assets/css/styles/index.css +0 -912
- package/templates/default/assets/css/styles/search/algolia.css +0 -125
- package/templates/default/assets/css/styles/search/pagefind.css +0 -60
- package/templates/default/assets/css/styles/variables.css +0 -30
- package/templates/default/assets/images/docula-logo-horizontal.webp +0 -0
- package/templates/default/assets/images/logo.svg +0 -10
- package/templates/default/doc.njk +0 -22
- package/templates/default/index.njk +0 -28
- package/templates/default/landing/landingHero.njk +0 -8
- package/templates/default/landing/singlePage.njk +0 -24
- package/templates/default/multipage/header.njk +0 -23
- package/templates/default/multipage/homeHeader.njk +0 -20
- package/templates/default/multipage/main.njk +0 -47
- package/templates/default/multipage/scripts.njk +0 -47
- package/templates/default/multipage/searchEngine.njk +0 -5
- package/templates/default/multipage/searchModal.njk +0 -19
- package/templates/default/multipage/sidebar.njk +0 -50
- package/templates/default/releases.njk +0 -38
- package/templates/default/search/algolia.njk +0 -98
- package/templates/default/search/pagefind.njk +0 -66
- package/templates/default/search-index.md +0 -14
- package/templates/default/shared/footer.njk +0 -4
- package/templates/default/shared/head.njk +0 -15
- package/templates/default/shared/highlightScript.njk +0 -6
- package/templates/default/shared/homeData.njk +0 -49
- package/templates/default/versions.njk +0 -40
- /package/{init/_includes/assets → template}/css/highlight/highlight.min.js +0 -0
- /package/{init/_includes/assets → template}/css/highlight/styles/base16/dracula.min.css +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--font-family: 'Open Sans', sans-serif;
|
|
3
|
+
|
|
4
|
+
--color-primary: #322d3c;
|
|
5
|
+
--color-secondary: #8cdc00;
|
|
6
|
+
--color-secondary-dark: #8cdc00;
|
|
7
|
+
--color-text: #322d3c;
|
|
8
|
+
|
|
9
|
+
--background: #ffffff;
|
|
10
|
+
--home-background: #ffffff;
|
|
11
|
+
--header-background: #ffffff;
|
|
12
|
+
|
|
13
|
+
--sidebar-background: #ffffff;
|
|
14
|
+
--sidebar-text: #322d3c;
|
|
15
|
+
--sidebar-text-active: #7d7887;
|
|
16
|
+
|
|
17
|
+
--border: rgba(238,238,245,1);
|
|
18
|
+
|
|
19
|
+
--background-search-highlight: var(--color-secondary-dark);
|
|
20
|
+
--color-search-highlight: #ffffff;
|
|
21
|
+
--search-input-background: var(--header-background);
|
|
22
|
+
|
|
23
|
+
--code: rgba(238,238,245,1);
|
|
24
|
+
|
|
25
|
+
--pagefind-ui-text: var(--color-text) !important;
|
|
26
|
+
--pagefind-ui-font: var(--font-family) !important;
|
|
27
|
+
--pagefind-ui-background: var(--background) !important;
|
|
28
|
+
--pagefind-ui-border: var(--border) !important;
|
|
29
|
+
--pagefind-ui-scale: .9 !important;
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,113 +1,76 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docula",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"exports": "./dist/docula.js",
|
|
6
|
-
"types": "./dist/docula.d.ts",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Beautiful Website for Your Projects",
|
|
7
5
|
"type": "module",
|
|
6
|
+
"exports": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"repository": "https://github.com/jaredwray/docula.git",
|
|
9
|
+
"author": "Jared Wray <me@jaredwray.com>",
|
|
8
10
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
10
|
-
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "tsc -p .",
|
|
13
|
-
"clean": "rm -rf dist && rm -rf test/data/site && rm -rf node_modules",
|
|
14
|
-
"test": "xo --fix && jest --coverage",
|
|
15
|
-
"test:code": "npm run build && node ./bin/docula.js",
|
|
16
|
-
"lint": "xo --fix",
|
|
17
|
-
"build:site": "npm run build && node ./bin/docula.js"
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/jaredwray/docula.git"
|
|
22
|
-
},
|
|
23
|
-
"bin": {
|
|
24
|
-
"docula": "./bin/docula.js"
|
|
11
|
+
"node": ">=18.0.0"
|
|
25
12
|
},
|
|
13
|
+
"license": "MIT",
|
|
26
14
|
"keywords": [
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
15
|
+
"static-site-generator",
|
|
16
|
+
"static-site",
|
|
17
|
+
"open source",
|
|
18
|
+
"ssg",
|
|
19
|
+
"documentation",
|
|
20
|
+
"website",
|
|
21
|
+
"templates",
|
|
22
|
+
"generator",
|
|
23
|
+
"framework",
|
|
24
|
+
"docula",
|
|
25
|
+
"writer",
|
|
26
|
+
"html",
|
|
27
|
+
"markdown",
|
|
28
|
+
"handlebars"
|
|
32
29
|
],
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
"bin": {
|
|
31
|
+
"docula": "./bin/docula.mjs"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"axios": "^1.6.7",
|
|
35
|
+
"ecto": "^3.0.2",
|
|
36
|
+
"express": "^4.18.2",
|
|
37
|
+
"feed": "^4.2.2",
|
|
38
|
+
"gray-matter": "^4.0.3",
|
|
39
|
+
"js-yaml": "^4.1.0",
|
|
40
|
+
"keyv": "^4.5.4",
|
|
41
|
+
"ts-node": "^10.9.2",
|
|
42
|
+
"update-notifier": "^7.0.0"
|
|
37
43
|
},
|
|
38
|
-
"homepage": "https://github.com/jaredwray/docula#readme",
|
|
39
44
|
"devDependencies": {
|
|
40
45
|
"@types/express": "^4.17.21",
|
|
41
|
-
"@types/
|
|
42
|
-
"@types/
|
|
43
|
-
"@types/
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"jest-resolve": "^29.7.0",
|
|
47
|
-
"jest-ts-webcompat-resolver": "^1.0.0",
|
|
48
|
-
"ts-jest": "^29.1.1",
|
|
49
|
-
"ts-jest-resolver": "^2.0.1",
|
|
46
|
+
"@types/js-yaml": "^4.0.9",
|
|
47
|
+
"@types/node": "^20.10.5",
|
|
48
|
+
"@types/update-notifier": "^6.0.8",
|
|
49
|
+
"@vitest/coverage-v8": "^1.1.0",
|
|
50
|
+
"rimraf": "^5.0.5",
|
|
50
51
|
"typescript": "^5.3.3",
|
|
52
|
+
"vitest": "^1.3.1",
|
|
51
53
|
"webpack": "^5.89.0",
|
|
52
|
-
"xo": "^0.
|
|
54
|
+
"xo": "^0.57.0"
|
|
53
55
|
},
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"axios": "^1.6.5",
|
|
61
|
-
"commander": "^11.1.0",
|
|
62
|
-
"dayjs": "^1.11.10",
|
|
63
|
-
"dotenv": "^16.3.1",
|
|
64
|
-
"download-stats": "^0.3.4",
|
|
65
|
-
"ecto": "^2.2.5",
|
|
66
|
-
"eleventy-plugin-toc": "^1.1.5",
|
|
67
|
-
"express": "^4.18.2",
|
|
68
|
-
"fs-extra": "^11.2.0",
|
|
69
|
-
"inquirer": "^9.2.12",
|
|
70
|
-
"instantsearch.js": "^4.64.0",
|
|
71
|
-
"luxon": "^3.4.4",
|
|
72
|
-
"markdown-it": "^14.0.0",
|
|
73
|
-
"markdown-it-anchor": "^8.6.7",
|
|
74
|
-
"node-fetch": "3.3.2",
|
|
75
|
-
"winston": "^3.11.0"
|
|
56
|
+
"xo": {
|
|
57
|
+
"ignores": [
|
|
58
|
+
"docula.config.*",
|
|
59
|
+
"vitest.config.mjs",
|
|
60
|
+
"bin/docula.js"
|
|
61
|
+
]
|
|
76
62
|
},
|
|
77
63
|
"files": [
|
|
78
64
|
"dist",
|
|
79
|
-
"bin",
|
|
80
65
|
"init",
|
|
81
|
-
"
|
|
66
|
+
"template",
|
|
67
|
+
"bin"
|
|
82
68
|
],
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"jest": {
|
|
92
|
-
"moduleFileExtensions": [
|
|
93
|
-
"ts",
|
|
94
|
-
"js"
|
|
95
|
-
],
|
|
96
|
-
"transform": {
|
|
97
|
-
"^.+\\.[jt]sx?$": [
|
|
98
|
-
"ts-jest",
|
|
99
|
-
{
|
|
100
|
-
"useESM": true,
|
|
101
|
-
"tsconfig": "tsconfig.json"
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
},
|
|
105
|
-
"resolver": "jest-ts-webcompat-resolver",
|
|
106
|
-
"testMatch": [
|
|
107
|
-
"**/test/*.test.(ts)",
|
|
108
|
-
"**/test/plugins/*.test.(ts)",
|
|
109
|
-
"**/test/eleventy/*.test.(ts)"
|
|
110
|
-
],
|
|
111
|
-
"testEnvironment": "node"
|
|
69
|
+
"scripts": {
|
|
70
|
+
"clean": "rimraf ./dist ./coverage ./node_modules ./package-lock.json ./yarn.lock ./pnpm-lock.yaml ./site/README.md ./site-output",
|
|
71
|
+
"build": "rimraf ./dist && tsc",
|
|
72
|
+
"build-site": "rimraf ./site/README.md && node bin/docula.mjs build -s ./site -o ./site-output",
|
|
73
|
+
"test": "xo --fix && vitest run --coverage",
|
|
74
|
+
"serve": "rimraf ./site/README.md && node bin/docula.mjs serve -s ./site -o ./site-output"
|
|
112
75
|
}
|
|
113
|
-
}
|
|
76
|
+
}
|
|
@@ -9,12 +9,15 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.home-hero {
|
|
12
|
-
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
height: 20vh;
|
|
13
15
|
background-color: var(--home-background)
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
.home-container {
|
|
17
|
-
|
|
19
|
+
max-width: 90%;
|
|
20
|
+
margin: 0 auto;
|
|
18
21
|
color: var(--color-text);
|
|
19
22
|
}
|
|
20
23
|
|
|
@@ -47,7 +50,15 @@
|
|
|
47
50
|
|
|
48
51
|
.home-hero img {
|
|
49
52
|
width: 100%;
|
|
50
|
-
max-width:
|
|
53
|
+
max-width: 200px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.github-fork-ribbon {
|
|
57
|
+
position: fixed !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.github-fork-ribbon:before {
|
|
61
|
+
background-color: var(--color-primary) !important;
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
.content-container {
|
|
@@ -180,6 +191,7 @@ footer {
|
|
|
180
191
|
justify-content: center;
|
|
181
192
|
align-items: center;
|
|
182
193
|
border-top: 1px solid var(--border);
|
|
194
|
+
width: 100%;
|
|
183
195
|
}
|
|
184
196
|
|
|
185
197
|
footer img {
|
|
@@ -188,20 +200,15 @@ footer img {
|
|
|
188
200
|
}
|
|
189
201
|
|
|
190
202
|
@media screen and (min-width: 640px) {
|
|
191
|
-
.home-hero {
|
|
192
|
-
padding: 64px 0 72px;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
203
|
.home-container {
|
|
196
|
-
|
|
197
|
-
margin-right: 64px;
|
|
204
|
+
max-width: 82%;
|
|
198
205
|
}
|
|
199
206
|
}
|
|
200
207
|
|
|
201
208
|
|
|
202
209
|
@media screen and (min-width: 768px) {
|
|
203
210
|
.home-hero {
|
|
204
|
-
|
|
211
|
+
height: 40vh;
|
|
205
212
|
}
|
|
206
213
|
|
|
207
214
|
.header-logo {
|
|
@@ -209,7 +216,7 @@ footer img {
|
|
|
209
216
|
}
|
|
210
217
|
|
|
211
218
|
.home-hero img {
|
|
212
|
-
max-width:
|
|
219
|
+
max-width: 340px;
|
|
213
220
|
}
|
|
214
221
|
|
|
215
222
|
.content-container {
|
|
@@ -228,7 +235,6 @@ footer img {
|
|
|
228
235
|
|
|
229
236
|
@media screen and (min-width: 992px) {
|
|
230
237
|
.home-container {
|
|
231
|
-
margin: 72px auto 56px;
|
|
232
238
|
max-width: 70%;
|
|
233
239
|
}
|
|
234
240
|
|
|
@@ -240,10 +246,6 @@ footer img {
|
|
|
240
246
|
font-size: 24px;
|
|
241
247
|
}
|
|
242
248
|
|
|
243
|
-
.home-hero {
|
|
244
|
-
padding: 120px 0;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
249
|
.nav {
|
|
248
250
|
padding-right: 56px;
|
|
249
251
|
width: 100%;
|
|
@@ -255,7 +257,7 @@ footer img {
|
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
.home-hero img {
|
|
258
|
-
max-width:
|
|
260
|
+
max-width: 600px;
|
|
259
261
|
}
|
|
260
262
|
|
|
261
263
|
.home-title {
|
|
@@ -276,7 +278,7 @@ footer img {
|
|
|
276
278
|
}
|
|
277
279
|
|
|
278
280
|
footer img {
|
|
279
|
-
height:
|
|
281
|
+
height: 28px;
|
|
280
282
|
width: auto;
|
|
281
283
|
}
|
|
282
284
|
}
|
|
@@ -25,6 +25,7 @@ body {
|
|
|
25
25
|
color: var(--color-text);
|
|
26
26
|
font-size: 16px;
|
|
27
27
|
background-color: var(--background);
|
|
28
|
+
min-height: 100vh;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
a {
|
|
@@ -45,6 +46,12 @@ button {
|
|
|
45
46
|
font-size: 14px;
|
|
46
47
|
}
|
|
47
48
|
|
|
49
|
+
hr {
|
|
50
|
+
border-top: 0;
|
|
51
|
+
border-bottom: 1px solid var(--border);
|
|
52
|
+
margin: 12px 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
48
55
|
.nav {
|
|
49
56
|
padding-left: 16px;
|
|
50
57
|
padding-right: 16px;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<meta charset="UTF-8" />
|
|
2
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
3
|
+
<link rel="stylesheet" href="/css/variables.css" />
|
|
4
|
+
<link rel="stylesheet" href="/css/index.css" />
|
|
5
|
+
<link rel="stylesheet" href="/css/home.css" />
|
|
6
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
7
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
8
|
+
<link
|
|
9
|
+
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap"
|
|
10
|
+
rel="stylesheet"
|
|
11
|
+
/>
|
|
12
|
+
<link
|
|
13
|
+
rel="stylesheet"
|
|
14
|
+
href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css"
|
|
15
|
+
/>
|
|
16
|
+
<link rel="stylesheet" href="/css/highlight/styles/base16/dracula.min.css" />
|
|
17
|
+
<link rel="icon" href="/favicon.ico" />
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<article class="home-container">
|
|
2
|
+
<div class="content">{{{content}}}</div>
|
|
3
|
+
|
|
4
|
+
{{#if github}}
|
|
5
|
+
{{#if github.contributors}}
|
|
6
|
+
<div class="content-container">
|
|
7
|
+
<h2 class="home-title">Contributors</h2>
|
|
8
|
+
<div class="facepile-container">
|
|
9
|
+
<div class="facepile">
|
|
10
|
+
{{#each github.contributors}}
|
|
11
|
+
<a
|
|
12
|
+
href="{{html_url}}"
|
|
13
|
+
target="_blank"
|
|
14
|
+
title="{{login}}"
|
|
15
|
+
rel="noopener noreferrer"
|
|
16
|
+
>
|
|
17
|
+
<img src="{{avatar_url}}" alt="{{login}}" />
|
|
18
|
+
</a>
|
|
19
|
+
{{/each}}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
{{/if}}
|
|
24
|
+
|
|
25
|
+
{{#if github.releases}}
|
|
26
|
+
<div class="content-container">
|
|
27
|
+
<h2 class="home-title">Latest's Releases</h2>
|
|
28
|
+
{{#each github.releases as |release|}}
|
|
29
|
+
{{#if (lt @index 3)}}
|
|
30
|
+
<div class="release">
|
|
31
|
+
<div class="release-header">
|
|
32
|
+
<a
|
|
33
|
+
class="release-title"
|
|
34
|
+
href="{{release.html_url}}"
|
|
35
|
+
target="_blank"
|
|
36
|
+
rel="noopener noreferrer"
|
|
37
|
+
>{{release.name}}</a>
|
|
38
|
+
<span class="release-date">{{#moment
|
|
39
|
+
release.published_at "MMMM DD, yyyy"
|
|
40
|
+
}}{{/moment}}
|
|
41
|
+
</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="release-body">
|
|
44
|
+
{{#if release.body}}
|
|
45
|
+
{{#markdown}}{{release.body}}{{/markdown}}
|
|
46
|
+
{{/if}}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
{{/if}}
|
|
50
|
+
{{/each}}
|
|
51
|
+
|
|
52
|
+
{{#if (gt github.releases.length 6)}}
|
|
53
|
+
<div>
|
|
54
|
+
<a class="release-btn" href="/releases">
|
|
55
|
+
All Releases
|
|
56
|
+
<span>→</span>
|
|
57
|
+
</a>
|
|
58
|
+
</div>
|
|
59
|
+
{{/if}}
|
|
60
|
+
</div>
|
|
61
|
+
{{/if}}
|
|
62
|
+
{{/if}}
|
|
63
|
+
</article>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
{{> header }}
|
|
5
|
+
<title>{{ siteTitle }}</title>
|
|
6
|
+
</head>
|
|
7
|
+
|
|
8
|
+
<body>
|
|
9
|
+
{{> landing/hero }}
|
|
10
|
+
<a class="github-fork-ribbon" href="https://github.com/{{ githubPath }}" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
|
|
11
|
+
{{> landing/content }}
|
|
12
|
+
{{> footer}}
|
|
13
|
+
|
|
14
|
+
{{> scripts }}
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
{{> header }}
|
|
5
|
+
<title>{{siteTitle}} Releases</title>
|
|
6
|
+
</head>
|
|
7
|
+
|
|
8
|
+
<body>
|
|
9
|
+
{{> landing/hero }}
|
|
10
|
+
<a class="github-fork-ribbon" href="https://github.com/jaredwray/docula" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
|
|
11
|
+
<main class="home-container">
|
|
12
|
+
<div class="content-container versions-container">
|
|
13
|
+
<h2 class="home-title">Releases</h2>
|
|
14
|
+
{{#if github}}
|
|
15
|
+
{{#if github.releases}}
|
|
16
|
+
{{#each github.releases as |release|}}
|
|
17
|
+
<div class="release">
|
|
18
|
+
<div class="release-header">
|
|
19
|
+
<a
|
|
20
|
+
class="release-title"
|
|
21
|
+
href="{{release.html_url}}"
|
|
22
|
+
target="_blank"
|
|
23
|
+
rel="noopener noreferrer"
|
|
24
|
+
>{{release.name}}</a>
|
|
25
|
+
<span class="release-date">{{#moment
|
|
26
|
+
release.published_at "MMMM DD, yyyy"
|
|
27
|
+
}}{{/moment}}
|
|
28
|
+
</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="release-body">
|
|
31
|
+
{{#if release.body}}
|
|
32
|
+
{{#markdown}}{{release.body}}{{/markdown}}
|
|
33
|
+
{{/if}}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
{{/each}}
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
</div>
|
|
40
|
+
</main>
|
|
41
|
+
{{> footer}}
|
|
42
|
+
|
|
43
|
+
{{> scripts }}
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
package/bin/docula.js
DELETED
package/dist/config.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { PluginConfig, PluginConfigs, PluginName, Plugins } from './types/config.js';
|
|
2
|
-
export declare class Config {
|
|
3
|
-
originPath: string;
|
|
4
|
-
outputPath: string;
|
|
5
|
-
dataPath: string;
|
|
6
|
-
templatePath: string;
|
|
7
|
-
searchEngine: string;
|
|
8
|
-
pluginConfig: PluginConfigs;
|
|
9
|
-
plugins: Plugins;
|
|
10
|
-
imagesPath: string;
|
|
11
|
-
assetsPath: string;
|
|
12
|
-
siteUrl: string;
|
|
13
|
-
siteType: string;
|
|
14
|
-
ajv: any;
|
|
15
|
-
private readonly schema;
|
|
16
|
-
constructor(path?: string);
|
|
17
|
-
loadConfig(path: string): void;
|
|
18
|
-
loadPlugins(name: PluginName, config: PluginConfig): void;
|
|
19
|
-
checkConfigFile(path: string): boolean;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAGxF,qBAAa,MAAM;IAClB,UAAU,SAAU;IACpB,UAAU,SAAU;IACpB,QAAQ,SAAU;IAClB,YAAY,SAAc;IAC1B,YAAY,SAAc;IAE1B,YAAY,EAAE,aAAa,CAAuB;IAClD,OAAO,EAAE,OAAO,CAAM;IACtB,UAAU,SAAY;IACtB,UAAU,SAAS;IACnB,OAAO,SAAM;IACb,QAAQ,SAAM;IAEd,GAAG,MAAa;IAEhB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,IAAI,CAAC,EAAE,MAAM;IAczB,UAAU,CAAC,IAAI,EAAE,MAAM;IAwCvB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY;IAWlD,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAGtC"}
|
package/dist/config.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import Ajv from 'ajv';
|
|
3
|
-
import { jsonConfigSchema } from './schemas.js';
|
|
4
|
-
import DoculaPlugins from './plugins/index.js';
|
|
5
|
-
export class Config {
|
|
6
|
-
originPath = 'site';
|
|
7
|
-
outputPath = 'dist';
|
|
8
|
-
dataPath = 'data';
|
|
9
|
-
templatePath = 'template';
|
|
10
|
-
searchEngine = 'pagefind';
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
12
|
-
pluginConfig = {};
|
|
13
|
-
plugins = [];
|
|
14
|
-
imagesPath = 'images';
|
|
15
|
-
assetsPath = 'css';
|
|
16
|
-
siteUrl = '';
|
|
17
|
-
siteType = '';
|
|
18
|
-
// @ts-expect-error - ajv is not callable
|
|
19
|
-
ajv = new Ajv();
|
|
20
|
-
schema;
|
|
21
|
-
constructor(path) {
|
|
22
|
-
this.schema = { ...jsonConfigSchema };
|
|
23
|
-
this.schema.required = [];
|
|
24
|
-
const configPath = path ?? `./${this.originPath}/config.json`;
|
|
25
|
-
const configFileExists = this.checkConfigFile(configPath);
|
|
26
|
-
if (configFileExists) {
|
|
27
|
-
this.loadConfig(configPath);
|
|
28
|
-
}
|
|
29
|
-
if (path && !configFileExists) {
|
|
30
|
-
throw new Error('Config file not found');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
loadConfig(path) {
|
|
34
|
-
const data = readFileSync(path, { encoding: 'utf8' });
|
|
35
|
-
const jsonConfig = JSON.parse(data);
|
|
36
|
-
if (jsonConfig.plugins) {
|
|
37
|
-
for (const name of jsonConfig.plugins) {
|
|
38
|
-
this.loadPlugins(name, jsonConfig[name]);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
this.schema.required = [...new Set(this.schema.required)];
|
|
42
|
-
const validate = this.ajv.compile(this.schema);
|
|
43
|
-
validate(jsonConfig);
|
|
44
|
-
if (validate.errors) {
|
|
45
|
-
const [error] = validate.errors;
|
|
46
|
-
// @ts-expect-error - dataPath exist without error"
|
|
47
|
-
const { dataPath, message, keyword, params } = error;
|
|
48
|
-
if (keyword === 'additionalProperties') {
|
|
49
|
-
const { additionalProperty } = params;
|
|
50
|
-
throw new Error(`The config file has an invalid property: ${additionalProperty}`);
|
|
51
|
-
}
|
|
52
|
-
throw new Error(`${dataPath} ${message}`);
|
|
53
|
-
}
|
|
54
|
-
this.originPath = jsonConfig.originPath ?? this.originPath;
|
|
55
|
-
this.outputPath = jsonConfig.outputPath ?? this.outputPath;
|
|
56
|
-
this.dataPath = jsonConfig.dataPath ?? this.dataPath;
|
|
57
|
-
this.templatePath = jsonConfig.templatePath ?? this.templatePath;
|
|
58
|
-
this.searchEngine = jsonConfig.searchEngine ?? this.searchEngine;
|
|
59
|
-
this.imagesPath = jsonConfig.imagesPath ?? this.imagesPath;
|
|
60
|
-
this.assetsPath = jsonConfig.assetsPath ?? this.assetsPath;
|
|
61
|
-
this.plugins = jsonConfig.plugins ?? this.plugins;
|
|
62
|
-
this.siteUrl = jsonConfig.siteUrl ?? this.siteUrl;
|
|
63
|
-
}
|
|
64
|
-
loadPlugins(name, config) {
|
|
65
|
-
if (config) {
|
|
66
|
-
this.pluginConfig[name] = config;
|
|
67
|
-
const pluginSchema = DoculaPlugins[name].schema;
|
|
68
|
-
this.schema.properties[name] = pluginSchema;
|
|
69
|
-
if (pluginSchema.required?.length) {
|
|
70
|
-
this.schema.required.push(name);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
checkConfigFile(path) {
|
|
75
|
-
return existsSync(path);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACjD,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAoB,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAEjE,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,MAAM;IAClB,UAAU,GAAG,MAAM,CAAC;IACpB,UAAU,GAAG,MAAM,CAAC;IACpB,QAAQ,GAAG,MAAM,CAAC;IAClB,YAAY,GAAG,UAAU,CAAC;IAC1B,YAAY,GAAG,UAAU,CAAC;IAC1B,0EAA0E;IAC1E,YAAY,GAAkB,EAAmB,CAAC;IAClD,OAAO,GAAY,EAAE,CAAC;IACtB,UAAU,GAAG,QAAQ,CAAC;IACtB,UAAU,GAAG,KAAK,CAAC;IACnB,OAAO,GAAG,EAAE,CAAC;IACb,QAAQ,GAAG,EAAE,CAAC;IACd,yCAAyC;IACzC,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IAEC,MAAM,CAAe;IAEtC,YAAY,IAAa;QACxB,IAAI,CAAC,MAAM,GAAG,EAAC,GAAG,gBAAgB,EAAC,CAAC;QACpC,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;QAC1B,MAAM,UAAU,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,UAAU,cAAc,CAAC;QAC9D,MAAM,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAC1D,IAAI,gBAAgB,EAAE,C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,CAAC,IAAY;QAC3B,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACD","sourcesContent":["import {existsSync, readFileSync} from 'node:fs';\nimport Ajv from 'ajv';\nimport {type ConfigSchema, jsonConfigSchema} from './schemas.js';\nimport type {PluginConfig, PluginConfigs, PluginName, Plugins} from './types/config.js';\nimport DoculaPlugins from './plugins/index.js';\n\nexport class Config {\n\toriginPath = 'site';\n\toutputPath = 'dist';\n\tdataPath = 'data';\n\ttemplatePath = 'template';\n\tsearchEngine = 'pagefind';\n\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\tpluginConfig: PluginConfigs = {} as PluginConfigs;\n\tplugins: Plugins = [];\n\timagesPath = 'images';\n\tassetsPath = 'css';\n\tsiteUrl = '';\n\tsiteType = '';\n\t// @ts-expect-error - ajv is not callable\n\tajv = new Ajv();\n\n\tprivate readonly schema: ConfigSchema;\n\n\tconstructor(path?: string) {\n\t\tthis.schema = {...jsonConfigSchema};\n\t\tthis.schema.required = [];\n\t\tconst configPath = path ?? `./${this.originPath}/config.json`;\n\t\tconst configFileExists = this.checkConfigFile(configPath);\n\t\tif (configFileExists) {\n\t\t\tthis.loadConfig(configPath);\n\t\t}\n\n\t\tif (path && !configFileExists) {\n\t\t\tthrow new Error('Config file not found');\n\t\t}\n\t}\n\n\tloadConfig(path: string) {\n\t\tconst data = readFileSync(path, {encoding: 'utf8'});\n\t\tconst jsonConfig = JSON.parse(data) as Record<string, any>;\n\n\t\tif (jsonConfig.plugins) {\n\t\t\tfor (const name of jsonConfig.plugins) {\n\t\t\t\tthis.loadPlugins(name, jsonConfig[name]);\n\t\t\t}\n\t\t}\n\n\t\tthis.schema.required = [...new Set(this.schema.required)];\n\n\t\tconst validate: Ajv.ValidateFunction = this.ajv.compile(this.schema);\n\n\t\tvalidate(jsonConfig);\n\n\t\tif (validate.errors) {\n\t\t\tconst [error] = validate.errors;\n\t\t\t// @ts-expect-error - dataPath exist without error\"\n\t\t\tconst {dataPath, message, keyword, params} = error;\n\t\t\tif (keyword === 'additionalProperties') {\n\t\t\t\tconst {additionalProperty} = params as Record<string, string>;\n\t\t\t\tthrow new Error(`The config file has an invalid property: ${additionalProperty}`);\n\t\t\t}\n\n\t\t\tthrow new Error(`${dataPath as string} ${message!}`);\n\t\t}\n\n\t\tthis.originPath = jsonConfig.originPath ?? this.originPath;\n\t\tthis.outputPath = jsonConfig.outputPath ?? this.outputPath;\n\t\tthis.dataPath = jsonConfig.dataPath ?? this.dataPath;\n\t\tthis.templatePath = jsonConfig.templatePath ?? this.templatePath;\n\t\tthis.searchEngine = jsonConfig.searchEngine ?? this.searchEngine;\n\n\t\tthis.imagesPath = jsonConfig.imagesPath ?? this.imagesPath;\n\t\tthis.assetsPath = jsonConfig.assetsPath ?? this.assetsPath;\n\t\tthis.plugins = jsonConfig.plugins ?? this.plugins;\n\t\tthis.siteUrl = jsonConfig.siteUrl ?? this.siteUrl;\n\t}\n\n\tloadPlugins(name: PluginName, config: PluginConfig) {\n\t\tif (config) {\n\t\t\tthis.pluginConfig[name] = config;\n\t\t\tconst pluginSchema = DoculaPlugins[name].schema;\n\t\t\tthis.schema.properties[name] = pluginSchema;\n\t\t\tif (pluginSchema.required?.length) {\n\t\t\t\tthis.schema.required.push(name);\n\t\t\t}\n\t\t}\n\t}\n\n\tcheckConfigFile(path: string): boolean {\n\t\treturn existsSync(path);\n\t}\n}\n"]}
|
package/dist/docula-plugin.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type Runtime = 'before' | 'after';
|
|
2
|
-
export type Options = Record<string, string>;
|
|
3
|
-
export type Schema = Record<string, any>;
|
|
4
|
-
export type DoculaPlugin = {
|
|
5
|
-
options: Record<string, string>;
|
|
6
|
-
runtime: Runtime;
|
|
7
|
-
execute(): Promise<void>;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=docula-plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docula-plugin.d.ts","sourceRoot":"","sources":["../src/docula-plugin.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACzC,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB,CAAC"}
|
package/dist/docula-plugin.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docula-plugin.js","sourceRoot":"","sources":["../src/docula-plugin.ts"],"names":[],"mappings":"","sourcesContent":["\nexport type Runtime = 'before' | 'after';\nexport type Options = Record<string, string>;\nexport type Schema = Record<string, any>;\n\nexport type DoculaPlugin = {\n\toptions: Record<string, string>;\n\truntime: Runtime;\n\texecute(): Promise<void>;\n};\n"]}
|
package/dist/docula.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docula.d.ts","sourceRoot":"","sources":["../src/docula.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAMnC,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAEjD,qBAAa,MAAM;IAClB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;IACpC,OAAO,CAAC,eAAe,CAAuB;IAE9C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAwB;IACtD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IACrD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyE;gBAE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