Skip to content

Commit c63ea98

Browse files
authored
Merge pull request #967 from Philippus/open-graph-urls
Use absolute url's in opengraph tags, fixes #964
2 parents 030d7bf + 6503a41 commit c63ea98

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ title: The Scala Programming Language
22

33
scalaversion: "2.12.7"
44

5+
url: https://www.scala-lang.org
56
baseurl: ""
67
markdown: kramdown
78
highlighter:

_includes/headertop.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}</title>
4+
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}</title>
55
{% if page.title %}
66
<meta property="og:title" content="{{ page.title }}"/>
7+
{% else %}
8+
<meta property="og:title" content="{{ site.title }}"/>
79
{% endif %}
810
{% if page.description %}
911
<meta name="description" content="{{ page.description }}"/>
@@ -13,9 +15,9 @@
1315
<meta name="twitter:site" content="@scala_lang"/>
1416
<meta name="twitter:creator" content="@scala_lang"/>
1517
{% if page.url %}
16-
<meta property="og:url" content="{{ site.baseurl }}{{ page.url }}"/>
18+
<meta property="og:url" content="{{ site.url }}{{ page.url }}"/>
1719
{% endif %}
18-
<meta property="og:image" content="{{ site.baseurl }}/resources/img/scala-spiral-3d-2-toned-down.png"/>
20+
<meta property="og:image" content="{{ site.url }}/resources/img/scala-spiral-3d-2-toned-down.png"/>
1921

2022
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
2123
<meta name="viewport" content="width=device-width, initial-scale=1"/>

0 commit comments

Comments
 (0)