Skip to content

Commit 68e8ba9

Browse files
authored
feat: Add schema.org structured data and improve semantic markup (#85)
- **Structured Data**: - Introduced `itemscope` and `itemtype` for `<html>` as `WebPage` and `<body>` as `Person`. - Added `itemprop` attributes for: - Profile image (`image`) - Name (`name`) - Job title (`jobTitle`) - Profile links (`url`) - Social links (`sameAs`). - **Accessibility**: - Enhanced semantic structure for links and images with metadata. - Improved compatibility with search engines and assistive technologies. - **Impact**: - Boosts SEO through structured data. - Improves usability and discoverability of content across platforms.
1 parent a781062 commit 68e8ba9

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

src/views/index.ejs

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" itemscope itemtype="https://schema.org/WebPage">
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@@ -35,24 +35,41 @@
3535
}
3636
</script>
3737
</head>
38-
<body>
38+
<body itemprop="about" itemscope itemtype="https://schema.org/Person">
3939
<header>
4040
<picture>
4141
<source type="image/webp" srcset="../assets/images/profile100w100h.png?as=webp" />
42-
<img class="clazz-profile-image" src="../assets/images/profile100w100h.png" alt="Profile picture of <%= name %>, CTO @ Apter" loading="eager" width="100" height="100" />
42+
<img class="clazz-profile-image"
43+
src="../assets/images/profile100w100h.png"
44+
alt="Profile picture of <%= name %>, CTO @ Apter"
45+
itemprop="image"
46+
loading="eager"
47+
width="100"
48+
height="100" />
4349
</picture>
44-
<h1><%= name %><br/><span>CTO & Engineering Lead</span></h1>
50+
<h1><span itemprop="name"><%= name %></span><br/><span itemprop="jobTitle">CTO & Engineering Lead</span></h1>
4551
</header>
4652
<main>
4753
<nav class="clazz-profile-links" aria-label="Profile links">
4854
<% links.forEach(function(link) { %>
49-
<a class="clazz-button" href="<%- link.url %>" aria-label="Visit <%= link.name %>" target="_blank" rel="noopener noreferrer ugc"><%= link.name %></a>
55+
<a class="clazz-button"
56+
href="<%- link.url %>"
57+
aria-label="Visit <%= link.name %>"
58+
target="_blank"
59+
rel="noopener noreferrer ugc"
60+
itemprop="url">
61+
<%= link.name %>
62+
</a>
5063
<% }); %>
5164
</nav>
5265
<nav class="clazz-social-links" aria-label="Social links">
5366
<% socialLinks.forEach(function(link) { %>
5467
<div class="clazz-social-link-container">
55-
<a href="<%- link.url %>" aria-label="Visit <%= link.name %>" target="_blank" rel="noopener noreferrer ugc">
68+
<a href="<%- link.url %>"
69+
aria-label="Visit <%= link.name %>"
70+
target="_blank"
71+
rel="noopener noreferrer ugc"
72+
itemprop="sameAs">
5673
<%- include(`../assets/images/fa6-brands-${link.icon}.svg`) %>
5774
</a>
5875
</div>

0 commit comments

Comments
 (0)