]> git.maquefel.me Git - brevno-suite/hugo/commit
FIXME: hugolib: markdown_title: add title from markdown
authorNikita Shubin <nikita.shubin@maquefel.me>
Sun, 26 Apr 2026 07:24:59 +0000 (10:24 +0300)
committerNikita Shubin <nikita.shubin@maquefel.me>
Sun, 26 Apr 2026 10:12:12 +0000 (13:12 +0300)
commit5bf2312cf9569a4797cb3997430fca7aaa492f49
treea72992917cfbf63976e88e7a5b65c5a1d7c46908
parentd3bb1c71399bed513bb3bf985c07f1c91ae8069f
FIXME: hugolib: markdown_title: add title from markdown

Getting title from the page itself, as first encountered header in
markdown file.

Currently it's inefficient as we parsing page twice, the first in some
ealier point when hugo renders markdown, so it should be embedded
somewhere in that place.

But currently i don't care about if a PoC implementation.

Currently it's required to use '.MarkdownTitleInfo.Title' instead of
'.Title', where appropriate.

TODO:
- make it config controllable
- embed it into .Title:
  - fallback to Meta if no markdown title available
  - or do the opposite and use it if no Meta provided

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
hugolib/hugo_sites.go
hugolib/markdown_title.go [new file with mode: 0644]
hugolib/page.go
hugolib/page__common.go
hugolib/page__new.go
hugolib/site.go