Skip to content

Build your personal knowledge base with Trilium Notes

feat(in-app-help): remove duplicate <h1>

Elian Doranbac529f1f11c
diff --git a/src/public/app/widgets/type_widgets/doc.ts b/src/public/app/widgets/type_widgets/doc.ts
index 86bd7addee..8008276ad4 100644
--- a/src/public/app/widgets/type_widgets/doc.ts
+++ b/src/public/app/widgets/type_widgets/doc.ts
@@ -58,6 +58,9 @@ export default class DocTypeWidget extends TypeWidget {
#processContent(url: string) {
const dir = url.substring(0, url.lastIndexOf("/"));
+ // Remove top-level heading since it's already handled by the note title
+ this.$content.find("h1").remove();
+
// Images are relative to the docnote but that will not work when rendered in the application since the path breaks.
this.$content.find("img").each((i, el) => {
const $img = $(el);