Skip to content
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

Include project name and version in og:title #261

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

jonathanhefner
Copy link
Member

This adds ENV["HORO_PROJECT_NAME"] and ENV["HORO_BADGE_VERSION"] to the og:title meta tag. The intent is to differentiate titles between different versions of the documentation.

Note that og:title is typically an abridged form of the page title. og:title values longer than ~60 characters may be truncated. The string " (Ruby on Rails v7.0.0)" is 23 characters, leaving ~40 characters for the full module name. Most public modules in the Rails API appear to fall within that limit. But even for those that don't, the project version and name will be truncated first, leaving og:title no worse than before.

This adds `ENV["HORO_PROJECT_NAME"]` and `ENV["HORO_BADGE_VERSION"]` to
the `og:title` meta tag.  The intent is to differentiate titles between
different versions of the documentation.

Note that `og:title` is typically an abridged form of the page title.
`og:title` values longer than ~60 characters may be truncated.  The
string " (Ruby on Rails v7.0.0)" is 23 characters, leaving ~40
characters for the full module name.  Most public modules in the Rails
API appear to fall within that limit.  But even for those that don't,
the project version and name will be truncated first, leaving `og:title`
no worse than before.
@jonathanhefner jonathanhefner merged commit 3d35d07 into rails:main Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant