Repository navigation
Expand file tree
/
Copy pathseo.html
More file actions
168 lines (159 loc) · 7.87 KB
/
Copy pathseo.html
File metadata and controls
168 lines (159 loc) · 7.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{%- comment -%}
SEO head tags. Expects `lang`, `t` and `translations` from the default layout.
{%- endcomment -%}
{%- assign seo = site.data.seo -%}
{%- assign base_url = site.production_url | append: "#" | replace: "/#", "" -%}
{%- assign page_url = base_url | append: page.url -%}
{%- assign is_project = false -%}{%- if page.collection == "work" -%}{%- assign is_project = true -%}{%- endif -%}
{%- assign is_post = false -%}{%- if page.collection == "posts" -%}{%- assign is_post = true -%}{%- endif -%}
{%- if is_project -%}{%- assign base = site.work | where: "lang", "pt" | where: "ref", page.ref | first | default: page -%}{%- endif -%}
{%- comment -%} Title {%- endcomment -%}
{%- if page.ref == "home" -%}
{%- assign seo_title = t.seo_title -%}
{%- elsif page.seo_title -%}
{%- assign seo_title = page.seo_title -%}
{%- elsif is_project -%}
{%- assign seo_title = page.title | append: ": " | append: page.role | append: " · " | append: t.case | append: " | " | append: seo.name -%}
{%- else -%}
{%- assign seo_title = page.title | append: " | " | append: seo.name -%}
{%- endif -%}
{%- comment -%} Description (max ~160 chars) {%- endcomment -%}
{%- if page.ref == "home" -%}
{%- assign seo_desc = t.seo_description -%}
{%- else -%}
{%- assign seo_desc = page.description | default: t.seo_description | strip_html | strip_newlines | truncate: 160 -%}
{%- endif -%}
{%- comment -%} Share image {%- endcomment -%}
{%- if is_project and base.cover -%}
{%- assign og_image = base.cover -%}
{%- elsif is_post and page.image -%}
{%- assign og_image = page.image -%}
{%- else -%}
{%- assign og_image = t.og_image -%}
{%- endif -%}
{%- comment -%} Canonical {%- endcomment -%}
{%- if page.medium_url -%}{%- assign canonical = page.medium_url -%}{%- else -%}{%- assign canonical = page_url | replace: "/index.html", "/" -%}{%- endif -%}
<title>{{ seo_title | escape }}</title>
<meta name="description" content="{{ seo_desc | escape }}">
<meta name="author" content="{{ seo.name }}">
{%- if page.noindex %}
<meta name="robots" content="noindex, follow">
{%- else %}
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
{%- endif %}
<link rel="canonical" href="{{ canonical }}">
{%- if translations %}
{%- for l in site.languages %}
{%- assign alt = translations | where: "lang", l | first %}
{%- if alt %}
<link rel="alternate" hreflang="{{ site.data.i18n[l].html_lang }}" href="{{ base_url }}{{ alt.url }}">
{%- if l == site.default_lang %}
<link rel="alternate" hreflang="x-default" href="{{ base_url }}{{ alt.url }}">
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endif %}
<link rel="alternate" type="application/rss+xml" title="{{ seo.name }} | Blog" href="{{ base_url }}/rss.xml">
<meta property="og:site_name" content="{{ seo.name }}">
<meta property="og:title" content="{{ seo_title | escape }}">
<meta property="og:description" content="{{ seo_desc | escape }}">
<meta property="og:url" content="{{ page_url }}">
<meta property="og:type" content="{% if is_post %}article{% elsif page.ref == 'about' or page.ref == 'bio' %}profile{% else %}website{% endif %}">
<meta property="og:image" content="{{ base_url }}{{ og_image }}">
<meta property="og:image:alt" content="{{ seo.name }}, {{ seo.job_title[lang] }}">
<meta property="og:locale" content="{{ t.og_locale }}">
{%- for l in site.languages %}{% if l != lang %}
<meta property="og:locale:alternate" content="{{ site.data.i18n[l].og_locale }}">
{%- endif %}{% endfor %}
{%- if page.ref == 'about' or page.ref == 'bio' %}
<meta property="profile:first_name" content="Vagner">
<meta property="profile:last_name" content="Ribas">
{%- endif %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ seo_title | escape }}">
<meta name="twitter:description" content="{{ seo_desc | escape }}">
<meta name="twitter:image" content="{{ base_url }}{{ og_image }}">
{%- for u in seo.same_as %}
<link rel="me" href="{{ u }}">
{%- endfor %}
{%- comment -%} Structured data (schema.org JSON-LD) {%- endcomment -%}
{%- capture occupations -%}
{%- for o in seo.occupations -%}
{"@type":"Occupation","name":{{ o[lang] | jsonify }},"occupationLocation":{"@type":"City","name":"Porto Alegre"},"skills":{{ seo.knows_about | join: ", " | jsonify }}}{% unless forloop.last %},{% endunless %}
{%- endfor -%}
{%- endcapture %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Person",
"@id": "{{ base_url }}/#person",
"name": {{ seo.name | jsonify }},
"givenName": "Vagner",
"familyName": "Ribas",
"url": "{{ base_url }}/",
"image": "{{ base_url }}{{ seo.photo }}",
"email": "mailto:{{ seo.email }}",
"jobTitle": {{ seo.job_title[lang] | jsonify }},
"description": {{ t.seo_description | jsonify }},
"hasOccupation": [{{ occupations }}],
"knowsAbout": {{ seo.knows_about | jsonify }},
"knowsLanguage": ["pt-BR", "en", "es"],
"worksFor": {"@type": "Organization", "name": {{ seo.works_for | jsonify }}},
"alumniOf": {"@type": "CollegeOrUniversity", "name": {{ seo.alumni_of.name | jsonify }}, "url": "{{ seo.alumni_of.url }}"},
"address": {"@type": "PostalAddress", "addressLocality": "{{ seo.city }}", "addressRegion": "{{ seo.region }}", "addressCountry": "{{ seo.country }}"},
"sameAs": {{ seo.same_as | jsonify }}
},
{
"@type": "WebSite",
"@id": "{{ base_url }}/#website",
"url": "{{ base_url }}/",
"name": {{ seo.name | jsonify }},
"description": {{ t.seo_description | jsonify }},
"inLanguage": ["pt-BR", "en", "es"],
"publisher": {"@id": "{{ base_url }}/#person"}
},
{
"@type": "{% if page.ref == 'about' or page.ref == 'bio' %}ProfilePage{% elsif page.ref == 'home' %}CollectionPage{% else %}WebPage{% endif %}",
"@id": "{{ page_url }}#webpage",
"url": "{{ page_url }}",
"name": {{ seo_title | jsonify }},
"description": {{ seo_desc | jsonify }},
"inLanguage": "{{ t.html_lang }}",
"isPartOf": {"@id": "{{ base_url }}/#website"},
{%- if page.ref == 'about' or page.ref == 'bio' or page.ref == 'home' %}
"mainEntity": {"@id": "{{ base_url }}/#person"},
{%- endif %}
"about": {"@id": "{{ base_url }}/#person"},
"primaryImageOfPage": {"@type": "ImageObject", "url": "{{ base_url }}{{ og_image }}"},
"dateModified": "{{ site.time | date_to_xmlschema }}"
}
{%- if is_project %},
{
"@type": "CreativeWork",
"@id": "{{ page_url }}#work",
"name": {{ page.title | append: ": " | append: page.headline | jsonify }},
"headline": {{ page.headline | jsonify }},
"description": {{ page.description | strip_html | jsonify }},
"url": "{{ page_url }}",
"image": "{{ base_url }}{{ og_image }}",
"inLanguage": "{{ t.html_lang }}",
{%- if base.year %}
"dateCreated": "{{ base.year }}",
{%- endif %}
"creator": {"@id": "{{ base_url }}/#person"},
"author": {"@id": "{{ base_url }}/#person"},
"keywords": {{ page.role | append: ", Product Design, UX Design, UI Design, Design System" | jsonify }}
},
{
"@type": "BreadcrumbList",
"itemListElement": [
{"@type": "ListItem", "position": 1, "name": {{ t.nav_work | jsonify }}, "item": "{{ base_url }}{{ t.prefix }}/"},
{"@type": "ListItem", "position": 2, "name": {{ page.title | jsonify }}, "item": "{{ page_url }}"}
]
}
{%- endif %}
]
}
</script>