Skip to content

Commit 33d8e3a

Browse files
committed
Improve SEO by adding description and keywords
1 parent 98e7b67 commit 33d8e3a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/layouts/layout.haml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
%meta{content: "width=device-width, initial-scale=1", name: "viewport"}/
55
%meta{charset: "utf-8"}
66
%meta{content: "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}
7+
- if current_page.data.description
8+
- raise "description too long" if current_page.data.description.length > 160
9+
%meta{name: "description", content:"#{current_page.data.description}"}
10+
- if current_page.data.keywords
11+
%meta{name: "keywords", content:"#{current_page.data.keywords}"}
712
%link{href: "/images/favicon.ico", rel: "icon", type: "image/ico"}
813

914
%link{href: "http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro", rel: "stylesheet", type: "text/css"}

0 commit comments

Comments
 (0)