-
Notifications
You must be signed in to change notification settings - Fork 202
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
Use site.title for meta tag if available #100
Conversation
@@ -26,6 +26,14 @@ def url | |||
config["github"]["url"] | |||
end | |||
end | |||
|
|||
def title |
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.
Perhaps
def title
config["title"] || config["name"]
end
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.
I am trying to avoid output of title=""
if neither is specified.
Am I overthinking this?
afae66d
to
6888aa8
Compare
%(href="#{url}/#{path}") | ||
] | ||
if title | ||
link_attributes << %(title="#{title}") |
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.
Is this too complicated for what I'm trying to accomplish?
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.
Not sure if it makes sense here, but here's what we did for Jekyll avatar to solve a similar problem.
16fd64a
to
83aecf4
Compare
Oh hey 💯 |
2bcacf9
to
25cbb59
Compare
I think this is a lot cleaner (even if slightly over-engineered). 👍 |
1808306
to
3cac66c
Compare
@jekyllbot: merge +minor |
This will use
site.title
(if present) for the feed title when rendering the<link>
tag. Ifsite.title
is undefined, it will fallback tosite.name
.This mirrors the current behavior of the feed itself: