-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add open-graph tags support #31
base: main
Are you sure you want to change the base?
Conversation
@jchapuis Can you please rebase to solve conflicts? Thanks! |
f18986d
to
b30f8e2
Compare
@mkurz sure! done |
b30f8e2
to
c0bb47d
Compare
c0bb47d
to
fc5fb68
Compare
@jchapuis You need to format the codebase |
yes i saw it was build.sbt i believe, pushed a commit |
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 think one of the URI's need to be updated
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.
lgtm. @mkurz Want to take a look?
theme/src/main/assets/page.st
Outdated
@@ -27,6 +27,15 @@ $! | |||
<meta name="viewport" content="width=device-width,initial-scale=1"> | |||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |||
<meta name="description" content="$page.properties.("project.description")$"> | |||
$ if (page.properties.("project.name")) $ | |||
<meta property="og:title" content="$page.properties.("project.name")$"> |
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 we should use project name as og:title
.
Shouldn't we use something like here instead?
sbt-paradox-material-theme/theme/src/main/assets/page.st
Lines 48 to 54 in 4b214d8
$ if (page.properties.("title")) $ | |
<title>$page.properties.("title")$</title> | |
$ elseif (page.title) $ | |
<title>$page.title$$ if (!page.home.active) $ · $page.home.title$$ endif $</title> | |
$ else $ | |
<title>$page.home.title$</title> | |
$ endif $ |
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 think those were metadata of open graph
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.
@Roiocam I understand that, however my point is if it makes sense to use the "project name" as og:title
. Maybe it would be better to use the same value like we use for the html <title>
tag.
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.
Got it, makes sense. Thanks
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.
good point, changed, but i kept the condition logic simple, where you have to define the page title property for it to be exposed in opengraph. Or would we want to have the same logic? trying to avoid unnecessary duplication
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.
LGTM, Thanks @jchapuis. It would be great to get reviews from others.
theme/src/main/assets/page.st
Outdated
@@ -27,6 +27,15 @@ $! | |||
<meta name="viewport" content="width=device-width,initial-scale=1"> | |||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |||
<meta name="description" content="$page.properties.("project.description")$"> | |||
$ if (page.properties.("project.name")) $ | |||
<meta property="og:title" content="$page.properties.("project.name")$"> |
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 think those were metadata of open graph
/cc @mdedetrich maybe you can also take a look here if you have time |
No description provided.