Skip to content

Commit 4d958d6

Browse files
committed
Add identity metadata
1 parent 6e82130 commit 4d958d6

1 file changed

Lines changed: 55 additions & 12 deletions

File tree

_layouts/base.html

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,73 @@
11
{%- assign site_url = "https://cb341.dev" -%}
2-
{%- assign default_title = "cb341.dev" -%}
3-
{%- assign default_description = "Full-stack software developer specializing in Ruby on Rails, web applications, and modern development practices. Portfolio, blog, and projects." -%}
4-
{%- if page.title and page.title != default_title -%}
5-
{%- assign page_title = page.title | append: " | " | append: default_title -%}
2+
{%- assign site_name = "cb341.dev" -%}
3+
{%- assign default_title = site.title | default: "Dani Bengl - Full-Stack Developer" -%}
4+
{%- assign default_description = site.description | default: "Full-stack software developer specializing in Ruby on Rails, web applications, and modern development practices. Portfolio, blog, and projects." -%}
5+
{%- if page.url == "/" -%}
6+
{%- assign page_title = "Dani Bengl (cb341) - Full-Stack Developer" -%}
7+
{%- elsif page.title and page.title != site_name -%}
8+
{%- assign page_title = page.title | append: " | " | append: site_name -%}
69
{%- else -%}
710
{%- assign page_title = default_title -%}
811
{%- endif -%}
912
{%- assign page_description = page.description | default: default_description -%}
1013
{%- assign current_url = site_url | append: page.url -%}
11-
{%- comment -%} og_type: posts have page.date set; everything else is a website {%- endcomment -%}
12-
{%- if page.date -%}
13-
{%- assign og_type = "article" -%}
14-
{%- else -%}
15-
{%- assign og_type = "website" -%}
16-
{%- endif -%}
14+
{%- assign social_image = site_url | append: "/assets/about/avatar.webp" -%}
1715
<!DOCTYPE html>
1816
<html lang="en">
1917
<head>
2018
<meta charset="utf-8">
2119
<meta name="viewport" content="width=device-width, initial-scale=1">
22-
<title>{{ page_title }}</title>
20+
<title>{{ page_title | escape }}</title>
2321

24-
<meta name="description" content="{{ page_description }}">
22+
<meta name="description" content="{{ page_description | escape }}">
2523
<meta name="author" content="Dani Bengl">
24+
<link rel="canonical" href="{{ current_url | escape }}">
2625
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
2726
<link rel="alternate" type="application/rss+xml" title="cb341.dev RSS Feed" href="/rss.xml">
27+
<script type="application/ld+json">
28+
{
29+
"@context": "https://schema.org",
30+
"@type": "WebSite",
31+
"name": "{{ site_name }}",
32+
"alternateName": "Dani Bengl",
33+
"url": "{{ site_url }}/",
34+
"author": {
35+
"@type": "Person",
36+
"name": "Dani Bengl",
37+
"alternateName": "cb341",
38+
"url": "{{ site_url }}/"
39+
}
40+
}
41+
</script>
42+
{%- if page.url == "/" or page.url == "/about/" %}
43+
<script type="application/ld+json">
44+
{
45+
"@context": "https://schema.org",
46+
"@type": "Person",
47+
"name": "Dani Bengl",
48+
"alternateName": "cb341",
49+
"url": "{{ site_url }}/",
50+
"image": "{{ social_image }}",
51+
"jobTitle": "Full-stack software developer",
52+
"knowsAbout": [
53+
"Ruby on Rails",
54+
"Rust",
55+
"computer science",
56+
"computer graphics",
57+
"open source software",
58+
"web development"
59+
],
60+
"sameAs": [
61+
"https://github.com/cb341",
62+
"https://gist.github.com/cb341",
63+
"https://www.linkedin.com/in/daniel-bengl",
64+
"https://mastodon.social/@cb341",
65+
"https://www.codewars.com/users/cb341",
66+
"https://www.lesswrong.com/users/cb341"
67+
]
68+
}
69+
</script>
70+
{%- endif %}
2871
<style>
2972
html, body { margin: 0; padding: 0; }
3073
body {

0 commit comments

Comments
 (0)