fix spelling + linking & add SEO optimizations

This commit is contained in:
SowinskiBraeden committed 2026-05-05 16:35:17 -07:00
1 parent a8ac8c238c
commit a09f3fc0d0
6 files changed
+125 -26

No files matched your search

+2 -2
View File
@@ -169,7 +169,7 @@
"title": "Joined the BCIT Computing Club as an Executive Member",
"slug": "joined-bcit-computing-club",
"type": "updates",
"summary": "After helping friends and existing exutives of the BCIT Computing Club, I have officially joined to help represent, and direct events such as reviews sessions, and hackathons.",
"summary": "After helping friends and existing executives of the BCIT Computing Club, I officially joined to help represent and support events such as review sessions and hackathons.",
"label": "Update",
"date": "2025-12-24",
"status": "New Role",
@@ -180,7 +180,7 @@
"tags": [
"Computing Club",
"Executive Member",
"BICT"
"BCIT"
],
"path": "./public/content/updates/joined-bcit-computing-club.md"
},
+40 -1
View File
@@ -59,13 +59,50 @@
return `<div class="${className}">${tags.map((tag) => `<span class="${className === "tag-list" ? "tag" : "entry-tag"}">${escapeHtml(tag)}</span>`).join("")}</div>`;
};
const setMetaContent = (selector, content) => {
const element = document.querySelector(selector);
if (!element || !content) {
return;
}
element.setAttribute("content", content);
};
const setCanonicalHref = (href) => {
const canonical = document.querySelector("link[rel='canonical']");
if (!canonical || !href) {
return;
}
canonical.setAttribute("href", href);
};
const updateEntryMeta = (entry) => {
const baseUrl = "https://sowinski.dev";
const title = `${entry.title} | Braeden Sowinski`;
const description = entry.summary || "Project entry or update from Braeden Sowinski.";
const url = `${baseUrl}/entry.html?type=${encodeURIComponent(entry.type)}&slug=${encodeURIComponent(entry.slug)}`;
const image = "https://avatars.githubusercontent.com/u/48144618?v=4";
document.title = title;
setCanonicalHref(url);
setMetaContent("meta[name='description']", description);
setMetaContent("meta[property='og:title']", title);
setMetaContent("meta[property='og:description']", description);
setMetaContent("meta[property='og:url']", url);
setMetaContent("meta[property='og:image']", image);
setMetaContent("meta[name='twitter:title']", title);
setMetaContent("meta[name='twitter:description']", description);
setMetaContent("meta[name='twitter:image']", image);
};
const renderLinks = (entry, className) => {
const links = [];
links.push(`<a class="${className} ${className}-primary" href="./entry.html?type=${encodeURIComponent(entry.type)}&slug=${encodeURIComponent(entry.slug)}">Read More</a>`);
if (entry.github) {
links.push(`<a class="${className}" href="${escapeHtml(entry.github)}" target="_blank" rel="noopener noreferrer">Github</a>`);
links.push(`<a class="${className}" href="${escapeHtml(entry.github)}" target="_blank" rel="noopener noreferrer">GitHub</a>`);
}
if (entry.demo) {
@@ -221,6 +258,8 @@
throw new Error("Entry not found.");
}
updateEntryMeta(entry);
const response = await fetch(entry.path);
if (!response.ok) {
throw new Error("Unable to load markdown entry.");