document.addEventListener("DOMContentLoaded", function () {
// Dynamisch meta description aanpassen
let metaDescription = document.querySelector("meta[name='description']");
if (!metaDescription) {
metaDescription = document.createElement("meta");
metaDescription.name = "description";
document.head.appendChild(metaDescription);
}
metaDescription.content = "Koop hoogwaardig tufting materiaal zoals tufting wol, garen, doek en guns bij Tufting Stuff. Workshops in Gent en levering in & EU.";
// Canonical tag toevoegen
let linkCanonical = document.querySelector("link[rel='canonical']");
if (!linkCanonical) {
linkCanonical = document.createElement("link");
linkCanonical.rel = "canonical";
document.head.appendChild(linkCanonical);
}
linkCanonical.href = window.location.href;
// Gestructureerde data (Schema.org JSON-LD)
let structuredDataScript = document.createElement("script");
structuredDataScript.type = "application/ld+json";
structuredDataScript.textContent = JSON.stringify({
"@context": "https://schema.org",
"@type": "Store",
"name": "Tufting Stuff",
"url": "https://www.tuftingstuff.shop",
"logo": "https://www.tuftingstuff.shop/logo.png",
"description": "Webshop gespecialiseerd in tufting materiaal: wol, garen, doek, guns en workshops in Gent.",
"address": {
"@type": "PostalAddress",
"streetAddress": "Muide Gent",
"addressLocality": "Gent",
"addressCountry": "BE"
},
"sameAs": [
"https://www.instagram.com/tufting_stuff.shop/",
]
});
document.head.appendChild(structuredDataScript);
// Interne linking optimaliseren
document.querySelectorAll("a").forEach(link => {
if (link.href.includes("tufting")) {
link.setAttribute("title", "Bestel " + link.innerText + " bij Tufting Stuff");
}
});
});