HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.7k stars 77 forks source link

Why Blog title on posts is an h1? #214

Closed strdr4605 closed 1 year ago

strdr4605 commented 1 year ago

Shouldn't a blog post have only one h1 tag that indicated the title of the content? Maybe SEO does not care that much about this nowadays. But there is a common practice for pages that have content and a title.

Why this is a problem for me?: I add things I read to a reading list. And I query for h1. For bearblog articles, I get the blog's title instead of content title. Here is my check "${document.querySelector("h1")?.innerText || document.title}". Change my mind to reverse the condition 😅

HermanMartinus commented 1 year ago

Heh, this has been discussed in a previous issue. The conclusion is that there are no negative consequences of having both the blog and article titles as h1 elements, even if that was previously considered bad practice. Search engines have become a lot smarter. The issue is that by changing the blog title to another element it breaks many blog's custom styling (if they use the h1 selector). Due to this it's not worth the hassle to change it for very minimal (or no) upside (although I am sorry that it doesn't cater to your reading list scraper) 😅