hdoc-tools 0.60.1 → 0.62.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.
Files changed (55) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +89 -75
  3. package/hdoc-build-db.js +275 -275
  4. package/hdoc-build-embeddings.js +202 -202
  5. package/hdoc-build-pdf.js +232 -232
  6. package/hdoc-build.js +14 -6
  7. package/hdoc-bump.js +4 -2
  8. package/hdoc-content-routes.js +143 -83
  9. package/hdoc-create.js +110 -108
  10. package/hdoc-db.js +114 -114
  11. package/hdoc-help.js +60 -60
  12. package/hdoc-init.js +103 -68
  13. package/hdoc-install-browser.js +145 -145
  14. package/hdoc-mermaid.js +204 -204
  15. package/hdoc-module.js +1102 -1079
  16. package/hdoc-serve.js +13 -7
  17. package/hdoc-stats.js +9 -9
  18. package/hdoc-validate-config.js +355 -329
  19. package/hdoc-validate-interbook.js +321 -0
  20. package/hdoc-validate.js +1231 -1158
  21. package/hdoc-ver.js +4 -2
  22. package/hdoc.js +12 -11
  23. package/npm-shrinkwrap.json +2 -2
  24. package/package.json +13 -2
  25. package/schemas/hdocbook-project.schema.json +20 -0
  26. package/schemas/hdocbook.schema.json +6 -2
  27. package/templates/doc-header-non-git.html +19 -19
  28. package/templates/doc-header.html +26 -26
  29. package/templates/init/.github/workflows/hdocbuild_onpull.yml +16 -16
  30. package/templates/init/.github/workflows/hdocbuild_onpush.yml +15 -15
  31. package/templates/init/LICENSE +21 -21
  32. package/templates/init/README.md +9 -9
  33. package/templates/init/_hdocbook/index.md +4 -4
  34. package/templates/init/gitignore +8 -8
  35. package/templates/init/resources/README.md +2 -2
  36. package/templates/pdf/css/custom-block.css +90 -90
  37. package/templates/pdf/css/fonts.css +221 -221
  38. package/templates/pdf/css/hdocs-pdf.css +495 -495
  39. package/templates/pdf/css/vars.css +404 -404
  40. package/templates/pdf/template-footer.html +19 -19
  41. package/templates/pdf/template-header.html +37 -37
  42. package/templates/pdf/template.html +20 -20
  43. package/templates/pdf-header-non-git.html +12 -12
  44. package/templates/pdf-header.html +16 -16
  45. package/ui/content/invalid-hdocbook-json.html +6 -6
  46. package/ui/content/invalid-hdocbook-json.md +7 -7
  47. package/ui/css/theme-default/styles/components/content.css +124 -124
  48. package/ui/css/theme-default/styles/components/sidebar.css +182 -182
  49. package/ui/css/theme-default/styles/htldoc.layouts.css +310 -310
  50. package/ui/index.html +419 -419
  51. package/ui/js/doc.hornbill.js +31 -44
  52. package/ui/js/mermaid-theme.json +27 -0
  53. package/hdoc-build-onyx.js +0 -134
  54. package/templates/mermaid-theme.yaml +0 -28
  55. package/templates/pdf/fonts/inter-cyrillic copy.woff2 +0 -0
package/hdoc-ver.js CHANGED
@@ -12,7 +12,9 @@
12
12
  );
13
13
  let hdocbook_project;
14
14
  try {
15
- hdocbook_project = require(hdocbook_project_config_path);
15
+ hdocbook_project = JSON.parse(
16
+ fs.readFileSync(hdocbook_project_config_path, "utf8"),
17
+ );
16
18
  } catch (e) {
17
19
  console.error("File not found: hdocbook-project.json:");
18
20
  console.log(e, "\n");
@@ -26,7 +28,7 @@
26
28
 
27
29
  let hdocbook_config;
28
30
  try {
29
- hdocbook_config = require(hdocbook_path);
31
+ hdocbook_config = JSON.parse(fs.readFileSync(hdocbook_path, "utf8"));
30
32
  } catch (e) {
31
33
  console.error("File not found: hdocbook.json");
32
34
  console.log(e, "\n");
package/hdoc.js CHANGED
@@ -162,7 +162,6 @@
162
162
  let gen_exclude = false;
163
163
  let bump_type = "patch"; // To generate spellcheck exclusions for all files
164
164
  let output_links = true;
165
- let onyx_index = false;
166
165
  let build_embeddings = true;
167
166
 
168
167
  // Get options from command args
@@ -211,8 +210,6 @@
211
210
  console_color = false;
212
211
  } else if (process.argv[x].toLowerCase() === "--no-links") {
213
212
  output_links = false;
214
- } else if (process.argv[x].toLowerCase() === "--onyx") {
215
- onyx_index = true;
216
213
  } else if (process.argv[x].toLowerCase() === "--no-embeddings") {
217
214
  build_embeddings = false;
218
215
  } else if (process.argv[x].toLowerCase() === "--quiet") {
@@ -247,15 +244,19 @@
247
244
  }
248
245
 
249
246
 
250
- // Add validated-links.txt to .gitignore if it doesn't exist
251
- const gitignorePath = path.join(source_path, ".gitignore");
252
- if (fs.existsSync(gitignorePath)) {
253
- const gitignoreContent = fs.readFileSync(gitignorePath, "utf8");
254
- if (!gitignoreContent.includes("validated-links.txt")) {
255
- fs.appendFileSync(gitignorePath, "\nvalidated-links.txt\n");
256
- console.info("Added validated-links.txt to .gitignore");
247
+ // build/validate write a validated-links.txt link cache into the book repo;
248
+ // make sure it's gitignored. Other commands don't touch the file, so they
249
+ // leave .gitignore alone.
250
+ if (["build", "validate"].includes(command.toLowerCase())) {
251
+ const gitignorePath = path.join(source_path, ".gitignore");
252
+ if (fs.existsSync(gitignorePath)) {
253
+ const gitignoreContent = fs.readFileSync(gitignorePath, "utf8");
254
+ if (!gitignoreContent.includes("validated-links.txt")) {
255
+ fs.appendFileSync(gitignorePath, "\nvalidated-links.txt\n");
256
+ console.info("Added validated-links.txt to .gitignore");
257
+ }
257
258
  }
258
- }
259
+ }
259
260
 
260
261
  if (command.toLowerCase() === "serve") {
261
262
  const server = require(path.join(__dirname, "hdoc-serve.js"));
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.59.0",
3
+ "version": "0.61.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "hdoc-tools",
9
- "version": "0.59.0",
9
+ "version": "0.61.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "ISC",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.60.1",
3
+ "version": "0.62.0",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {
@@ -12,7 +12,6 @@
12
12
  "hdoc-build.js",
13
13
  "hdoc-build-db.js",
14
14
  "hdoc-build-embeddings.js",
15
- "hdoc-build-onyx.js",
16
15
  "hdoc-build-pdf.js",
17
16
  "hdoc-bump.js",
18
17
  "hdoc-content-routes.js",
@@ -29,6 +28,7 @@
29
28
  "hdoc-toc.js",
30
29
  "hdoc-validate.js",
31
30
  "hdoc-validate-config.js",
31
+ "hdoc-validate-interbook.js",
32
32
  "hdoc-ver.js",
33
33
  "validateNodeVer.js",
34
34
  ".puppeteerrc.cjs",
@@ -48,6 +48,17 @@
48
48
  },
49
49
  "author": "Hornbill Technologies Ltd",
50
50
  "license": "ISC",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/hornbill/hdoc-tools.git"
54
+ },
55
+ "homepage": "https://github.com/hornbill/hdoc-tools#readme",
56
+ "bugs": {
57
+ "url": "https://github.com/hornbill/hdoc-tools/issues"
58
+ },
59
+ "engines": {
60
+ "node": ">=20"
61
+ },
51
62
  "dependencies": {
52
63
  "@huggingface/transformers": "3.8.1",
53
64
  "@mermaid-js/layout-elk": "0.2.1",
@@ -67,6 +67,26 @@
67
67
  "external_link_warnings": {
68
68
  "type": "boolean",
69
69
  "description": "When true, external link failures are reported as warnings rather than errors."
70
+ },
71
+ "spellcheckDictionary": {
72
+ "type": "array",
73
+ "description": "Words to exclude from the British English spellcheck across all documents in the book.",
74
+ "items": { "type": "string" }
75
+ }
76
+ }
77
+ },
78
+ "ai": {
79
+ "type": "object",
80
+ "description": "Configuration for the hdoc edit AI assist feature.",
81
+ "additionalProperties": false,
82
+ "properties": {
83
+ "model": {
84
+ "type": "string",
85
+ "description": "Anthropic model ID used by the hdoc edit AI assist feature."
86
+ },
87
+ "maxTokens": {
88
+ "type": "integer",
89
+ "description": "Maximum response tokens for AI assist requests."
70
90
  }
71
91
  }
72
92
  },
@@ -4,7 +4,7 @@
4
4
  "title": "HDocBook Configuration",
5
5
  "description": "Schema for hdocbook.json - book metadata, navigation, and publishing configuration",
6
6
  "type": "object",
7
- "required": ["docId", "title", "description", "version", "productFamily", "audience", "navigation"],
7
+ "required": ["docId", "title", "version", "productFamily", "audience", "navigation"],
8
8
  "additionalProperties": false,
9
9
  "properties": {
10
10
  "docId": {
@@ -98,7 +98,7 @@
98
98
  "properties": {
99
99
  "items": {
100
100
  "type": "array",
101
- "description": "Top-level navigation items. Maximum three levels of nesting are supported.",
101
+ "description": "Top-level navigation items. Maximum five levels of nesting are supported.",
102
102
  "minItems": 1,
103
103
  "items": { "$ref": "#/$defs/navigationItem" }
104
104
  }
@@ -128,6 +128,10 @@
128
128
  "type": "string",
129
129
  "description": "Display text for the navigation item."
130
130
  },
131
+ "id": {
132
+ "type": "string",
133
+ "description": "Opaque node identifier written by the hdoc edit navigation editor. Optional."
134
+ },
131
135
  "link": {
132
136
  "type": "string",
133
137
  "description": "Path to the content page. Ignored when 'items' is present."
@@ -1,20 +1,20 @@
1
- <div class="document-header">
2
- <div class="hb-container-horizontal">
3
- <div class="hb-center-v hb-container-expand">
4
- <ul class="ps-0 nav-bar-nav-list noeffects after-fslash overflow-ellipsis">{{breadcrumbs}}</ul>
5
- </div>
6
- <div class="toolbar-right hb-center-v">
7
- </div>
8
- </div>
9
-
10
- <h1>{{title}}</h1>
11
-
12
- <div class="hb-container-horizontal">
13
- <div class="hb-center-v hb-container-expand">
14
- <ul class="ps-0 nav-bar-nav-list noeffects after-bullets overflow-ellipsis text-light-2">
15
- <li class="ps-0 mt-0 nav-bar-item">{{doc-type}}</li>
16
- <li class="ps-0 mt-0 nav-bar-item">{{reading-time}} minutes to read</li>
17
- </ul>
18
- </div>
19
- </div>
1
+ <div class="document-header">
2
+ <div class="hb-container-horizontal">
3
+ <div class="hb-center-v hb-container-expand">
4
+ <ul class="ps-0 nav-bar-nav-list noeffects after-fslash overflow-ellipsis">{{breadcrumbs}}</ul>
5
+ </div>
6
+ <div class="toolbar-right hb-center-v">
7
+ </div>
8
+ </div>
9
+
10
+ <h1>{{title}}</h1>
11
+
12
+ <div class="hb-container-horizontal">
13
+ <div class="hb-center-v hb-container-expand">
14
+ <ul class="ps-0 nav-bar-nav-list noeffects after-bullets overflow-ellipsis text-light-2">
15
+ <li class="ps-0 mt-0 nav-bar-item">{{doc-type}}</li>
16
+ <li class="ps-0 mt-0 nav-bar-item">{{reading-time}} minutes to read</li>
17
+ </ul>
18
+ </div>
19
+ </div>
20
20
  </div>
@@ -1,27 +1,27 @@
1
- <div class="document-header">
2
- <div class="hb-container-horizontal">
3
- <div class="hb-center-v hb-container-expand">
4
- <ul class="ps-0 nav-bar-nav-list noeffects after-fslash overflow-ellipsis">{{breadcrumbs}}</ul>
5
- </div>
6
- <div class="toolbar-right hb-center-v">
7
- <a target="_blank" class="toolbar-action" href="{{edit-url}}" aria-label="Edit this page on GitHub">
8
- <i class="bi bi-pencil" aria-hidden="true"></i>
9
- </a>
10
- </div>
11
- </div>
12
-
13
- <h1>{{title}}</h1>
14
-
15
- <div class="hb-container-horizontal">
16
- <div class="hb-center-v hb-container-expand">
17
- <ul class="ps-0 nav-bar-nav-list noeffects after-bullets overflow-ellipsis text-light-2">
18
- <li class="ps-0 mt-0 nav-bar-item">{{doc-type}}</li>
19
- <li class="ps-0 mt-0 nav-bar-item">{{last-update}}</li>
20
- <li class="ps-0 mt-0 nav-bar-item">{{reading-time}} minutes to read</li>
21
- <li class="ps-0 mt-0 nav-bar-item">
22
- <a class="link c-pointer" data-bs-toggle="modal" data-bs-target="#contributersModal">{{contributor-count}} contributors</a>
23
- </li>
24
- </ul>
25
- </div>
26
- </div>
1
+ <div class="document-header">
2
+ <div class="hb-container-horizontal">
3
+ <div class="hb-center-v hb-container-expand">
4
+ <ul class="ps-0 nav-bar-nav-list noeffects after-fslash overflow-ellipsis">{{breadcrumbs}}</ul>
5
+ </div>
6
+ <div class="toolbar-right hb-center-v">
7
+ <a target="_blank" class="toolbar-action" href="{{edit-url}}" aria-label="Edit this page on GitHub">
8
+ <i class="bi bi-pencil" aria-hidden="true"></i>
9
+ </a>
10
+ </div>
11
+ </div>
12
+
13
+ <h1>{{title}}</h1>
14
+
15
+ <div class="hb-container-horizontal">
16
+ <div class="hb-center-v hb-container-expand">
17
+ <ul class="ps-0 nav-bar-nav-list noeffects after-bullets overflow-ellipsis text-light-2">
18
+ <li class="ps-0 mt-0 nav-bar-item">{{doc-type}}</li>
19
+ <li class="ps-0 mt-0 nav-bar-item">{{last-update}}</li>
20
+ <li class="ps-0 mt-0 nav-bar-item">{{reading-time}} minutes to read</li>
21
+ <li class="ps-0 mt-0 nav-bar-item">
22
+ <a class="link c-pointer" data-bs-toggle="modal" data-bs-target="#contributersModal">{{contributor-count}} contributors</a>
23
+ </li>
24
+ </ul>
25
+ </div>
26
+ </div>
27
27
  </div>
@@ -1,17 +1,17 @@
1
- name: HDocBuildPull
2
-
3
- on:
4
- # Triggers the workflow on pull request opened or reopened events
5
- pull_request_target:
6
- types: [opened, reopened]
7
- paths-ignore:
8
- - '.github/**'
9
-
10
- jobs:
11
- call-workflow-pull-validate:
12
- uses: Hornbill-Docs/hdoc-library/.github/workflows/hdocbuild_shared_pull.yml@main
13
- with:
14
- branch: ${{ github.event.pull_request.head.sha }}
15
- server_url: ${{ github.server_url }}
16
- repo: ${{ github.repository }}
1
+ name: HDocBuildPull
2
+
3
+ on:
4
+ # Triggers the workflow on pull request opened or reopened events
5
+ pull_request_target:
6
+ types: [opened, reopened]
7
+ paths-ignore:
8
+ - '.github/**'
9
+
10
+ jobs:
11
+ call-workflow-pull-validate:
12
+ uses: Hornbill-Docs/hdoc-library/.github/workflows/hdocbuild_shared_pull.yml@main
13
+ with:
14
+ branch: ${{ github.event.pull_request.head.sha }}
15
+ server_url: ${{ github.server_url }}
16
+ repo: ${{ github.repository }}
17
17
  run_id: ${{ github.run_id }}
@@ -1,15 +1,15 @@
1
- name: HDocBuildPush
2
- on:
3
- # Triggers the workflow on push requests
4
- push:
5
- paths-ignore:
6
- - '.github/**'
7
-
8
- # Allows us to run this workflow manually from the Actions tab
9
- workflow_dispatch:
10
-
11
- jobs:
12
- call-workflow-push-validate:
13
- uses: Hornbill-Docs/hdoc-library/.github/workflows/hdocbuild_shared_push.yml@main
14
- with:
15
- branch: ${{ github.event.inputs.branch }}
1
+ name: HDocBuildPush
2
+ on:
3
+ # Triggers the workflow on push requests
4
+ push:
5
+ paths-ignore:
6
+ - '.github/**'
7
+
8
+ # Allows us to run this workflow manually from the Actions tab
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ call-workflow-push-validate:
13
+ uses: Hornbill-Docs/hdoc-library/.github/workflows/hdocbuild_shared_push.yml@main
14
+ with:
15
+ branch: ${{ github.event.inputs.branch }}
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Hornbill Docs
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Hornbill Docs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,9 +1,9 @@
1
- # HDocBook documentation
2
- This is an example of a simple static content documentation project that is compatible with the Hornbill Docs system
3
-
4
- Make sure that you have installed hdoc-tools
5
-
6
- npm install hdoc-tools -g
7
-
8
- To preview the documentation in a browser, you can open a terminal window and run the dev preview server with the
9
- command `hdoc serve` and in a local browser go to the url `http://localhost:3000`
1
+ # HDocBook documentation
2
+ This is an example of a simple static content documentation project that is compatible with the Hornbill Docs system
3
+
4
+ Make sure that you have installed hdoc-tools
5
+
6
+ npm install hdoc-tools -g
7
+
8
+ To preview the documentation in a browser, you can open a terminal window and run the dev preview server with the
9
+ command `hdoc serve` and in a local browser go to the url `http://localhost:3000`
@@ -1,5 +1,5 @@
1
- ---
2
- layout: article-toc
3
- ---
4
- # Welcome
1
+ ---
2
+ layout: article-toc
3
+ ---
4
+ # Welcome
5
5
  This is your first page
@@ -1,9 +1,9 @@
1
- _work/
2
- node_modules/
3
- package-lock.json
4
- .wsuo
5
- .DS_Store
6
- VSWorkspaceState.json
7
- slnx.state
8
- slnx.sqlite
1
+ _work/
2
+ node_modules/
3
+ package-lock.json
4
+ .wsuo
5
+ .DS_Store
6
+ VSWorkspaceState.json
7
+ slnx.state
8
+ slnx.sqlite
9
9
  validated-links.txt
@@ -1,3 +1,3 @@
1
- You should store any files and resources that used in the creation of this hdocbook, but do not form part of the published content.
2
-
1
+ You should store any files and resources that used in the creation of this hdocbook, but do not form part of the published content.
2
+
3
3
  These files are included in the build and final content output but we should keep in the source code repo for future revisions. For example, if you were to create an image used in the content, say, in Photoshop, you will create the image and put that into the appropriate content location. However, you may also want to put the Photoshop source file into this **resources** folder in order to keep for the future, should anyone need to modify the image, we have the original source file.
@@ -1,90 +1,90 @@
1
- .custom-block {
2
- border: 1px solid transparent;
3
- border-radius: 8px;
4
- padding: 16px 16px 8px;
5
- line-height: 24px;
6
- font-size: var(--htl-default-font-size);
7
- color: var(--htl-c-text-2);
8
- }
9
-
10
- .custom-block.info {
11
- border-color: var(--htl-custom-block-info-border);
12
- color: var(--htl-custom-block-info-text);
13
- background-color: var(--htl-custom-block-info-bg);
14
- }
15
-
16
- .custom-block.info code {
17
- background-color: var(--htl-custom-block-info-code-bg);
18
- }
19
-
20
- .custom-block.tip {
21
- border-color: var(--htl-custom-block-tip-border);
22
- color: var(--htl-custom-block-tip-text);
23
- background-color: var(--htl-custom-block-tip-bg);
24
- }
25
-
26
- .custom-block.tip code {
27
- background-color: var(--htl-custom-block-tip-code-bg);
28
- }
29
-
30
- .custom-block.warning {
31
- border-color: var(--htl-custom-block-warning-border);
32
- color: var(--htl-custom-block-warning-text);
33
- background-color: var(--htl-custom-block-warning-bg);
34
- }
35
-
36
- .custom-block.warning code {
37
- background-color: var(--htl-custom-block-warning-code-bg);
38
- }
39
-
40
- .custom-block.danger {
41
- border-color: var(--htl-custom-block-danger-border);
42
- color: var(--htl-custom-block-danger-text);
43
- background-color: var(--htl-custom-block-danger-bg);
44
- }
45
-
46
- .custom-block.danger code {
47
- background-color: var(--htl-custom-block-danger-code-bg);
48
- }
49
-
50
- .custom-block.details {
51
- border-color: var(--htl-custom-block-details-border);
52
- color: var(--htl-custom-block-details-text);
53
- background-color: var(--htl-custom-block-details-bg);
54
- }
55
-
56
- .custom-block.details code {
57
- background-color: var(--htl-custom-block-details-code-bg);
58
- }
59
-
60
- .custom-block-title {
61
- font-weight: 700;
62
- }
63
-
64
- .custom-block p + p {
65
- margin: 8px 0;
66
- }
67
-
68
- .custom-block.details summary {
69
- margin: 0 0 8px;
70
- font-weight: 700;
71
- }
72
-
73
- .custom-block.details summary + p {
74
- margin: 8px 0;
75
- }
76
-
77
- .custom-block a {
78
- color: inherit;
79
- font-weight: 600;
80
- text-decoration: underline;
81
- transition: opacity 0.25s;
82
- }
83
-
84
- .custom-block a:hover {
85
- opacity: 0.6;
86
- }
87
-
88
- .custom-block code {
89
- font-size: var(--htl-custom-block-code-font-size);
90
- }
1
+ .custom-block {
2
+ border: 1px solid transparent;
3
+ border-radius: 8px;
4
+ padding: 16px 16px 8px;
5
+ line-height: 24px;
6
+ font-size: var(--htl-default-font-size);
7
+ color: var(--htl-c-text-2);
8
+ }
9
+
10
+ .custom-block.info {
11
+ border-color: var(--htl-custom-block-info-border);
12
+ color: var(--htl-custom-block-info-text);
13
+ background-color: var(--htl-custom-block-info-bg);
14
+ }
15
+
16
+ .custom-block.info code {
17
+ background-color: var(--htl-custom-block-info-code-bg);
18
+ }
19
+
20
+ .custom-block.tip {
21
+ border-color: var(--htl-custom-block-tip-border);
22
+ color: var(--htl-custom-block-tip-text);
23
+ background-color: var(--htl-custom-block-tip-bg);
24
+ }
25
+
26
+ .custom-block.tip code {
27
+ background-color: var(--htl-custom-block-tip-code-bg);
28
+ }
29
+
30
+ .custom-block.warning {
31
+ border-color: var(--htl-custom-block-warning-border);
32
+ color: var(--htl-custom-block-warning-text);
33
+ background-color: var(--htl-custom-block-warning-bg);
34
+ }
35
+
36
+ .custom-block.warning code {
37
+ background-color: var(--htl-custom-block-warning-code-bg);
38
+ }
39
+
40
+ .custom-block.danger {
41
+ border-color: var(--htl-custom-block-danger-border);
42
+ color: var(--htl-custom-block-danger-text);
43
+ background-color: var(--htl-custom-block-danger-bg);
44
+ }
45
+
46
+ .custom-block.danger code {
47
+ background-color: var(--htl-custom-block-danger-code-bg);
48
+ }
49
+
50
+ .custom-block.details {
51
+ border-color: var(--htl-custom-block-details-border);
52
+ color: var(--htl-custom-block-details-text);
53
+ background-color: var(--htl-custom-block-details-bg);
54
+ }
55
+
56
+ .custom-block.details code {
57
+ background-color: var(--htl-custom-block-details-code-bg);
58
+ }
59
+
60
+ .custom-block-title {
61
+ font-weight: 700;
62
+ }
63
+
64
+ .custom-block p + p {
65
+ margin: 8px 0;
66
+ }
67
+
68
+ .custom-block.details summary {
69
+ margin: 0 0 8px;
70
+ font-weight: 700;
71
+ }
72
+
73
+ .custom-block.details summary + p {
74
+ margin: 8px 0;
75
+ }
76
+
77
+ .custom-block a {
78
+ color: inherit;
79
+ font-weight: 600;
80
+ text-decoration: underline;
81
+ transition: opacity 0.25s;
82
+ }
83
+
84
+ .custom-block a:hover {
85
+ opacity: 0.6;
86
+ }
87
+
88
+ .custom-block code {
89
+ font-size: var(--htl-custom-block-code-font-size);
90
+ }