-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify "Godot Engine" in html titles #922
Conversation
I like the idea of unifying the titles! instead of repeating them in every page this could be added on the template itself. So that when a title is provided, it gets added |
Thanks! If you could point me at the correct file to edit, I'll give it a go. |
Line 20 in the default.html contains the logic for the title tag in the : godot-website/_layouts/default.html Line 20 in ce29cd1
What you see there is the template checking if
Could do the trick. But then you can be a bit more smart and also check if page.title already contains Godot Engine, or also add another variable to tell the template to not append the Hope that helps! |
Many thanks! I think I'm going to have to bail for now, though, as I'm having trouble getting the site to build locally so can't really test :( Still, if you wanted to merge my manual changes anyway, at least that would be better, even if not perfect. |
@JohnVeness I might make a new PR doing this from the template side. But what issues were you running into? I've updated the readme to cover how to run this project in linux, but what OS are you using? |
Ah, the new instructions seem to work fine, thanks. I expect the problem was that I wasn't using 3.1.2 - I was using 3.3, as supplied in the openSUSE Tumbleweed repos. I'll have a fiddle with the template idea. |
Please can you have a look now? I have removed all the manual page title changes for now, and done everything in the template. This looks rather clumsy at the moment, because it first removes a suffix " - Godot Engine" if the page currently has it, then adds it on again! This is to avoid having to search and replace the rest of the site for now (I can do this in a separate PR or add it to this one, then simplify this). I haven't done the same removal of a prefix "Godot Engine - " suffix yet. There are only a couple of pages that incorrectly use that, meaning you would see "Godot Engine - Community - Godot Engine" with this PR at the moment. Again, I can manually clean those in a separate PR or in this one. I have added a "notitlesuffix" property that can be added to a page so as to not modify the title at all. I have added this property to the home page only, so that it still appears as "Godot Engine - Free and open source 2D and 3D game engine", as I assume that has been specifically chosen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated a couple pages you missed. It should be good to go!
Thanks! |
Thanks for your help and encouragement! I quite enjoyed learning a little about jekyll. I was wondering if similar should be done to the og:title and twitter:title meta tags? I don't particular wish to share a link onto that hellhole to see how they look though... |
maybe it is not necessary? still, you can get previews in some other platforms like discord or mastodon. If it works there, it is pretty much the same as in the rest of pages. Except linkedin... no one really knows what linkedin will do with your link 💩 |
Most pages have HTML title tags (which show in browser title bars, tabs, bookmarks etc,) with a suffix of "- Godot Engine", e.g.:
But some didn't conform, e.g.:
or even just:
This PR is an attempt to unify the page titles, including removing duplication of "Godot" when appropriate.
However, I'm not sure this is necessarily the best solution. Maybe the site name should be defined somewhere centrally and automatically added as a suffix, rather than added to pages manually as I have done.
Also, my solution doesn't fix pages like:
etc.
There may be other pages I've missed.
Also also, I'm not sure if the blog category pages should be like:
Hence marking this as a draft for now. Suggestions welcome!