Skip to content

Commit 33ed4f6

Browse files
author
mcarbonell
committed
feat: BreadcrumbList Schema.org en todas las herramientas
1 parent 75dd19e commit 33ed4f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1163
-71
lines changed

generate-site.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,42 @@ async function generateTools(toolsIndex, lang) {
376376
categoryBadges += '</small></div>';
377377
}
378378

379+
// Generate BreadcrumbList Schema.org
380+
const breadcrumbItems = [{
381+
"@type": "ListItem",
382+
"position": 1,
383+
"name": "FastTools",
384+
"item": `https://${siteConfig.domain}${lang === siteConfig.defaultLanguage ? '' : '/' + lang}`
385+
}];
386+
387+
if (toolCategories.length > 0) {
388+
toolCategories.forEach((catId, index) => {
389+
const cat = categories.find(c => c.id === catId);
390+
if (cat) {
391+
const catUrl = lang === siteConfig.defaultLanguage ? `https://${siteConfig.domain}/${cat.slug[lang]}.html` : `https://${siteConfig.domain}/${lang}/${cat.slug[lang]}.html`;
392+
breadcrumbItems.push({
393+
"@type": "ListItem",
394+
"position": index + 2,
395+
"name": cat.name[lang],
396+
"item": catUrl
397+
});
398+
}
399+
});
400+
}
401+
402+
breadcrumbItems.push({
403+
"@type": "ListItem",
404+
"position": breadcrumbItems.length + 1,
405+
"name": translatedTool.title
406+
});
407+
408+
const breadcrumbSchema = {
409+
"@context": "https://schema.org",
410+
"@type": "BreadcrumbList",
411+
"itemListElement": breadcrumbItems
412+
};
413+
414+
generatedHtml = generatedHtml.replace(/{{schema_org_json}}/g, JSON.stringify(breadcrumbSchema, null, 2));
379415
generatedHtml = generatedHtml.replace(/{{category_badges}}/g, categoryBadges);
380416
generatedHtml = generatedHtml.replace(/{{tool_content}}/g, toolContent);
381417
// Inject translations as global variable for JS

web/es/tools/base64.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "Codificar/Decodificar Base64"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

web/es/tools/chat-ai.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "Chat con IA"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

web/es/tools/chat-pdf.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "Chat con PDF"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

web/es/tools/color-palette-generator.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "Generador de Paleta de Colores"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

web/es/tools/color-picker-converter.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "Selector y Conversor de Color"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

web/es/tools/compress-pdf.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "Comprimir PDF"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

web/es/tools/convert-image.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "Convertir formato de imagen"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

web/es/tools/csv-json.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "CSV ↔ JSON"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

web/es/tools/diff.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@
2626

2727
<!-- Schema.org markup -->
2828
<script type="application/ld+json">
29-
29+
{
30+
"@context": "https://schema.org",
31+
"@type": "BreadcrumbList",
32+
"itemListElement": [
33+
{
34+
"@type": "ListItem",
35+
"position": 1,
36+
"name": "FastTools",
37+
"item": "https://fasttools.tools/es"
38+
},
39+
{
40+
"@type": "ListItem",
41+
"position": 2,
42+
"name": "Comparar Textos"
43+
}
44+
]
45+
}
3046
</script>
3147
<!-- Fonts -->
3248
<link rel="preconnect" href="https://fonts.googleapis.com">

0 commit comments

Comments
 (0)