#how to get current page title in my component without any prop? [SOLVED]

9 messages · Page 1 of 1 (latest)

light widget
#

how to get current page title in my component without any prop?

#

how to get current page title in my component without any prop?

austere hatch
#

A number of questions

  1. What title? From frontmatter or an h1/h2 on the page
  2. Using content collections or a CMS
  3. well looks like 2 do it
light widget
austere hatch
#

So, solved, yes?

light widget
austere hatch
#

So you're picking frontmatter data from current pathname. Voila 💪🏻

#

Do you wanna edit your title to precede with [SOLVED]?