Skip to content

Commit 2d549ba

Browse files
authored
Improve title format for better SEO and readability (#1056)
* Improve title format for better SEO and readability * Change em dash to pipe in the title
1 parent f7adc24 commit 2d549ba

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

_layouts/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<head>
55
<meta charset="utf-8" />
6-
<title>{{ site.title }} - {{ page.title | escape }}</title>
6+
<title>{{ page.title | escape }} | {{ site.title }}</title>
77
{% if jekyll.environment == 'stage' %}
88
<meta name="robots" content="noindex" />
99
{% endif %}

_layouts/new-layouts/base.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>{{ site.title }} - {{ page.title | escape }}</title>
5+
<title>
6+
{% if page.url == "/" %} {{ page.title | escape }} {% else %} {{
7+
page.title | escape }} | {{ site.title }} {% endif %}
8+
</title>
69
{% if jekyll.environment == 'stage' %}
710
<meta name="robots" content="noindex" />
811
{% endif %}

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: new-layouts/base
3-
title: Welcome to Swift.org
3+
title: Swift Programming Language
44
atom: true
55
---
66

0 commit comments

Comments
 (0)