hdoc-tools 0.8.16 → 0.8.18
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/hdoc-build.js +9 -5
- package/package.json +1 -1
package/hdoc-build.js
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
});
|
|
106
106
|
} else {
|
|
107
107
|
// No header tag, no frontmatter title, output a warning
|
|
108
|
-
console.log(`No frontmatter title property, or ${h_tags_to_search.join(', ')} tags detected in ${file_path.path}`);
|
|
108
|
+
console.log(`[WARNING] No frontmatter title property, or ${h_tags_to_search.join(', ')} tags detected in ${file_path.path}`);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
} else {
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
});
|
|
122
122
|
} else {
|
|
123
123
|
// No header tag, no frontmatter title, output a warning
|
|
124
|
-
console.log(`No frontmatter title property, or ${h_tags_to_search.join(', ')} tags detected in ${file_path.path}`);
|
|
124
|
+
console.log(`[WARNING] No frontmatter title property, or ${h_tags_to_search.join(', ')} tags detected in ${file_path.path}`);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
// Add the reading time
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
doc_title = html_heading[0].children[0].data.trim();
|
|
258
258
|
} else {
|
|
259
259
|
// No header tag, no frontmatter title, output a warning
|
|
260
|
-
console.log(`No frontmatter title property, or h1, h2 or h3 header tags detected in ${file_path}`);
|
|
260
|
+
console.log(`[WARNING] No frontmatter title property, or h1, h2 or h3 header tags detected in ${file_path.path}`);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
@@ -387,8 +387,12 @@
|
|
|
387
387
|
const logical_path = doc_path.replace(path.extname(doc_path), '');
|
|
388
388
|
const bc_for_path = bc[logical_path];
|
|
389
389
|
let bc_tags = '\n';
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
if (bc_for_path) {
|
|
391
|
+
for (let i = 0; i < bc_for_path.length - 1; i++) {
|
|
392
|
+
bc_tags += `\t\t\t\t<li class="mt-0 nav-bar-item"><a href="${bc_for_path[i].link}" class="ps-0 pe-0 text-decoration-none">${bc_for_path[i].text}</a></li>\n`;
|
|
393
|
+
}
|
|
394
|
+
} else {
|
|
395
|
+
console.log(`[WARNING] Path is not present in navigation items: ${logical_path}`);
|
|
392
396
|
}
|
|
393
397
|
bc_tags += '\t\t\t';
|
|
394
398
|
wip_doc_header = wip_doc_header.replaceAll('{{breadcrumbs}}', bc_tags);
|