What problem are you trying to solve?
Title: Feature Request: Fall back to first H1 heading for document title when YAML frontmatter title is missing
Context
In many markdown repositories (such as personal wikis, Obsidian vaults, or documentation sets), documents do not always contain a YAML frontmatter block with a title key. For example, simple list files or notes imported from standard markdown editors often start directly with an H1 heading (e.g., # Someday / Open Loops) and omit frontmatter completely.
Current Behavior
When the OpenKnowledge server parses a document lacking a title key in its YAML frontmatter, it defaults to using the document path or slug (e.g., projects/make-alternate-universe-uno or resources/someday) as the title.
This raw path is then displayed in:
- Search Results: The search headers show the slug/path rather than a human-readable title.
- Directory Enriched Metadata: Running directory commands like
ls -A returns path-based titles under the Referenced files section.
- Link Autocompletions / Index lists: Graph visualizations and listings feel less polished.
Proposed Enhancement
If title is missing from the YAML frontmatter, the OpenKnowledge parser should fall back to the first H1 heading found in the document body (e.g., # Document Title).
The title resolution hierarchy should be:
title: key in YAML frontmatter (highest priority)
- First
# H1 Heading in the markdown body
- Filename / Slug (fallback)
- Full relative path (final fallback)
Benefits
- Clean UI & Search: Ensures search results and lists remain human-readable even for simple notes or legacy logs that don't need metadata frontmatter.
- Matches Modern SSG Standards: Pragmatic and aligned with conventions used by Nextra, Astro, and Docusaurus.
Proposed solution
No response
Area
Editor
Alternatives considered
No response
What problem are you trying to solve?
Title: Feature Request: Fall back to first H1 heading for document title when YAML frontmatter
titleis missingContext
In many markdown repositories (such as personal wikis, Obsidian vaults, or documentation sets), documents do not always contain a YAML frontmatter block with a
titlekey. For example, simple list files or notes imported from standard markdown editors often start directly with an H1 heading (e.g.,# Someday / Open Loops) and omit frontmatter completely.Current Behavior
When the OpenKnowledge server parses a document lacking a
titlekey in its YAML frontmatter, it defaults to using the document path or slug (e.g.,projects/make-alternate-universe-unoorresources/someday) as the title.This raw path is then displayed in:
ls -Areturns path-based titles under theReferenced filessection.Proposed Enhancement
If
titleis missing from the YAML frontmatter, the OpenKnowledge parser should fall back to the first H1 heading found in the document body (e.g.,# Document Title).The title resolution hierarchy should be:
title:key in YAML frontmatter (highest priority)# H1 Headingin the markdown bodyBenefits
Proposed solution
No response
Area
Editor
Alternatives considered
No response