Cimbali / Cimbali/markdown-viewer

Support YAML front matters

Open
#97 3 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
177
Forks
25
PR merge metrics
No merged PRs in 30d

Description

YAML front matters (as used by [assemble](https://assemble.io/docs/YAML-front-matter.html), [hugo](https://gohugo.io/content-management/front-matter/) [static website renderers], [zettlr](https://docs.zettlr.com/en/core/yaml-frontmatter/), [obsidian](https://help.obsidian.md/Advanced+topics/YAML+front+matter) [editors/note-taking tools], and [pandoc](https://pandoc.org/MANUAL.html#extension-yaml_metadata_block)) should either be ignored, or treated as metadata (rendered possibly as a table, or possibly in the box with the Contents).

rendering it as a header also has the side effect that, because there is no `` tag & the first header becomes the title, that the raw YAML (with line breaks stripped) becomes the text in the browser tab.

an example front matter & first header from a file that is notes from reading a book... in this case the ideal title would be `Supernatural, Michael Heiser (2015)` but it's actually `citekey: heiserSupernaturalWhatBible2015 ebook: - https://read.amazon.com/?_encoding=UTF8&asin=B016LT2YHA`

``` markdown
---
citekey: heiserSupernaturalWhatBible2015
ebook:
- https://read.amazon.com/?_encoding=UTF8&asin=B016LT2YHA
---

# *Supernatural*, Michael Heiser (2015)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by reproducing the supplied Markdown example in the viewer and trace how its YAML block is parsed and how the first header determines the browser title. Done should mean front matter no longer becomes rendered header text or the tab title, with the intended metadata behavior settled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, markdown, yaml
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.