Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ jobs:
working-directory: ./website
run: npm ci

- name: Extract metadata from anchor files
- name: Extract metadata and generate sitemap
working-directory: ./scripts
run: |
npm ci
node extract-metadata.js
node generate-sitemap.js

- name: Copy documentation files to public directory
run: |
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"extract-metadata": "node scripts/extract-metadata.js"
"extract-metadata": "node scripts/extract-metadata.js",
"generate-sitemap": "node scripts/generate-sitemap.js",
"build": "npm run extract-metadata && npm run generate-sitemap"
},
"keywords": [],
"author": "",
Expand Down
71 changes: 71 additions & 0 deletions scripts/generate-sitemap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env node

/**
* generate-sitemap.js
*
* Generates sitemap.xml for the Semantic Anchors website
*/

const fs = require('fs');
const path = require('path');

// Paths
const ANCHORS_DATA = path.join(__dirname, '..', 'website', 'public', 'data', 'anchors.json');
const OUTPUT_FILE = path.join(__dirname, '..', 'website', 'public', 'sitemap.xml');
const BASE_URL = 'https://llm-coding.github.io/Semantic-Anchors';

// Read anchors data
const anchorsData = JSON.parse(fs.readFileSync(ANCHORS_DATA, 'utf-8'));

// Generate sitemap
const today = new Date().toISOString().split('T')[0];

let sitemap = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- Homepage -->
<url>
<loc>${BASE_URL}/</loc>
<lastmod>${today}</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>

<!-- About Page -->
<url>
<loc>${BASE_URL}/#/about</loc>
<lastmod>${today}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>

<!-- Contributing Page -->
<url>
<loc>${BASE_URL}/#/contributing</loc>
<lastmod>${today}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>

`;

// Add all anchors
anchorsData.forEach(anchor => {
sitemap += ` <!-- Anchor: ${anchor.title} -->
<url>
<loc>${BASE_URL}/#/anchor/${anchor.id}</loc>
<lastmod>${today}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>

`;
});

sitemap += `</urlset>
`;

// Write sitemap
fs.writeFileSync(OUTPUT_FILE, sitemap, 'utf-8');

console.log(`✓ Sitemap generated: ${OUTPUT_FILE}`);
console.log(`✓ Total URLs: ${anchorsData.length + 3} (3 pages + ${anchorsData.length} anchors)`);
60 changes: 58 additions & 2 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,64 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Semantic Anchors - A curated catalog of well-defined terms for LLM communication" />
<title>Semantic Anchors</title>

<!-- Primary Meta Tags -->
<title>Semantic Anchors - Curated Catalog for LLM Communication</title>
<meta name="title" content="Semantic Anchors - Curated Catalog for LLM Communication" />
<meta name="description" content="60+ curated semantic anchors - well-defined terms, methodologies, and frameworks for precise communication with Large Language Models. Browse by category or role." />
<meta name="keywords" content="semantic anchors, LLM, large language models, AI communication, prompt engineering, software development, TDD, architecture patterns, design principles" />
<meta name="author" content="LLM Coding Community" />
<meta name="language" content="English, German" />

<!-- Canonical URL -->
<link rel="canonical" href="https://llm-coding.github.io/Semantic-Anchors/" />

<!-- Language Alternates -->
<link rel="alternate" hreflang="en" href="https://llm-coding.github.io/Semantic-Anchors/" />
<link rel="alternate" hreflang="de" href="https://llm-coding.github.io/Semantic-Anchors/?lang=de" />
<link rel="alternate" hreflang="x-default" href="https://llm-coding.github.io/Semantic-Anchors/" />

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://llm-coding.github.io/Semantic-Anchors/" />
<meta property="og:title" content="Semantic Anchors - Curated Catalog for LLM Communication" />
<meta property="og:description" content="60+ curated semantic anchors for precise LLM communication. Browse methodologies, frameworks, and patterns by category or professional role." />
<meta property="og:image" content="https://llm-coding.github.io/Semantic-Anchors/og-image.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="de_DE" />
<meta property="og:site_name" content="Semantic Anchors" />

<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content="https://llm-coding.github.io/Semantic-Anchors/" />
<meta name="twitter:title" content="Semantic Anchors - Curated Catalog for LLM Communication" />
<meta name="twitter:description" content="60+ curated semantic anchors for precise LLM communication. Browse by category or role." />
<meta name="twitter:image" content="https://llm-coding.github.io/Semantic-Anchors/twitter-card.png" />

<!-- Structured Data (Schema.org) -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "Semantic Anchors",
"alternateName": "Semantic Anchors for LLMs",
"url": "https://llm-coding.github.io/Semantic-Anchors/",
"description": "A curated catalog of 60+ semantic anchors - well-defined terms, methodologies, and frameworks for precise communication with Large Language Models",
"inLanguage": ["en", "de"],
"publisher": {
"@type": "Organization",
"name": "LLM Coding Community",
"url": "https://github.com/LLM-Coding"
},
"potentialAction": {
"@type": "SearchAction",
"target": "https://llm-coding.github.io/Semantic-Anchors/#/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
</head>
<body>
<div id="app"></div>
Expand Down
10 changes: 10 additions & 0 deletions website/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# robots.txt for Semantic Anchors

User-agent: *
Allow: /

# Sitemaps
Sitemap: https://llm-coding.github.io/Semantic-Anchors/sitemap.xml

# Disallow search bot indexing of specific paths if needed
# (currently allowing all)
Loading
Loading