Skip to content

Commit e1349aa

Browse files
authored
Add title tag (Kopernicus#50)
* Use include.title argument * Pass title into head
1 parent 249b658 commit e1349aa

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

_includes/head.html

+6
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,11 @@
1111
<!-- Latest compiled JavaScript -->
1212
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
1313

14+
{%- unless include.title contains "Kopernicus Wiki" -%}
15+
<title>{{ include.title }} - Kopernicus Wiki</title>
16+
{%- else -%}
17+
<title>{{ include.title }}</title>
18+
{%- endunless -%}
19+
1420
{%- feed_meta -%}
1521
</head>

_layouts/default.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
33

4-
{%- include head.html -%}
4+
{%- include head.html title=page.title -%}
55

66
<body>
77

0 commit comments

Comments
 (0)