Geeklog-Core / geeklog

Geeklog - The Secure CMS.
https://www.geeklog.net
24 stars 19 forks source link

Reformat these Pages to better follow SEO Guidlines for Headings #1104

Closed eSilverStrike closed 2 years ago

eSilverStrike commented 2 years ago

For those that don't have the H1 tag in the header of the site for their theme but in the blockheader.html file instead for pages run into issues with SEO checks by the search engines.

For example the way the profile page is setup results in multiple H1 tags for each section. The main section is the user profile and then the sub sections should be the lists.

https://www.geeklog.net/users.php?mode=profile&uid=11721

For when comments are viewed individual. When this happens we should add a proper page title for the page that includes a H tag (for these type of views only).

https://www.geeklog.net/comment.php?mode=view&cid=16379

One way to fix this would be for COM_ShowBlock in the appropriate areas include a secondary template block for the blockheader and call it something like blockheader-sub.thtml. We could just copy what is in blockheader.thtml change the h1 tag to H2 (among other fixes to the code).

eSilverStrike commented 2 years ago

@mystralkk For your info - I ended up adding a new block header template to make this work (and still keep things somewhat backwards compatible) called blockheader-child.thtml. It is the same as blockheader.thtml but the header tag in it is an h3 instead of an h2. This means we can now nest blocks at a child level which was needed for the User Profile page (for SEO purposes) and can also be used in other cases when needed.

This means for themes that do not have the h1 tag in the header used on the website name, but instead uses it for the page titles (in blockheader.thtml) for better SEO pages like User Profile now work properly. If I have time I may fix all the included Geeklog themes to work this way.

To update the styling for this change I just added it to custom.css. I don't think dengen is coming back so at some point I guess these type of changes should be added back properly into the main css files.

eSilverStrike commented 2 years ago

So Comments shown on their own page now has a title. This title does not show for example when an article is displayed along with the comments.

Also fixed issue with comment title on comment editor using H1 tag when comment editor displayed on same page as comments.. It now uses h2 and only h1 when comment editor on its own page.

eSilverStrike commented 2 years ago

Tweaked Comment section title and individual comment titles. After doing audit of headers a short title is needed when comments are displayed with a article, page, poll, etc.

Individual comment titles header also needed to change depending on if viewed with article or on a comments only page.