Currently, Obsidian provides the option to “Hide page title” on Published pages.
When this option is turned on, the H1 (i.e. Heading 1), instead of the filename, will effectively become the title which user sees for each page.
However, the filename is used as the Page Title, which shows up primarily in 2 places:
Google Search result — This is very important for my use case because I usually have a much more detailed H1 title, and often containing special characters, whereas my filenames are kept short and concise (and free of special characters) for ease of typing (an example). When the filename is shown in Google Search results, it’s NOT representative of the real title of my page.
The name of the Chrome tab and bookmarks — This is less of a concern for me but it’s still helpful to have the user see a the same page title (which is the H1) show up as the tab name — it’s more consistent behavior for the viewer.
Proposed solution
Use the first H1 tag available on the note as the Page Title (explained above) on Obsidian Publish hosted pages. If no H1 is available, then fallback to using the filename as the page title, as it’s doing today.
Current workaround (optional)
Not aware of any workaround. Would appreciate any workaround ideas if there are any!!
Related feature requests (optional)
This request is somewhat similar to the a previous FR but it’s actually different — it’s specific to Obsidian Publish but not the main app — it’s a less intrusive feature and potentially much easier to implement (e.g. through post-load javascript).
This is an important feature to me and would greatly appreciate any considerations and help! Thanks!!
That said, i’d still think it would be a good default behavior for Obsidian Publish, when the “Hide page title” option is turned on — I’d say it’s the more expected behavior.
I need to be able to set meta header title separately from the filename. My pages are named 1, 2, 3, 4, and so on, which doesn’t make for nice SEO titles. The H1 or even frontmatter title property would work well for me. Another things that doesn’t work for me is the description property, that have been advertised to work in the official documentation… Yes, I have a custom domain.
This would be very helpful because my notes include dates and numbers, which really messes Google search results and page titles in tabs and bookmarks! Would love page title to be specified used frontmatter.