Skip to content

Commit 842fbbd

Browse files
committed
Fix SEO issues from Google Search Console audit
- Add canonical tags to all VitePress docs pages via transformPageData - Add X-Robots-Tag: noindex header for XML files in Cloudflare Worker - Block /docs/sitemap.xml in robots.txt, point Sitemap to /sitemap.xml - Add lastmod dates to sitemap entries for better crawl priority - Optimize homepage title and meta description for target keywords - Update OG and Twitter meta tags to match new title/description - Clean up YOOtheme plugin description (remove em dash, AI vocabulary) - Simplify IndexNow error handling in deploy script
1 parent cdcd81e commit 842fbbd

File tree

5 files changed

+26
-18
lines changed

5 files changed

+26
-18
lines changed

build/website-deploy.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,7 @@ else
381381
echo -e "${YELLOW}Step 6: Notifying search engines via IndexNow...${NC}"
382382
echo "Waiting 5 seconds for deployment to propagate..."
383383
sleep 5
384-
./indexnow-notify.sh
385-
386-
if [ $? -eq 0 ]; then
384+
if ./indexnow-notify.sh; then
387385
echo -e "${GREEN}✓ Search engines notified${NC}"
388386
else
389387
echo -e "${YELLOW}⚠ IndexNow notification failed (non-fatal)${NC}"

docs/USER/.vitepress/config.mjs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
99

1010
export default defineConfig({
1111
title: 'Health Checker for Joomla',
12-
description: 'Free Joomla 5+ extension with 130+ automated health checks for security, performance, SEO, and database. Instant reports from your admin panel.',
12+
description: 'Monitor your Joomla 5 site with 130+ automated health checks. Scan security, performance, SEO, sitemaps, and database issues in seconds. Free and open source.',
1313
base: '/docs/',
1414
outDir: '../../website/public/docs',
1515
cleanUrls: true,
@@ -249,7 +249,7 @@ export default defineConfig({
249249
// Generate per-page OG/Twitter meta tags from frontmatter
250250
transformPageData(pageData) {
251251
const title = pageData.title || 'Health Checker for Joomla'
252-
const description = pageData.frontmatter?.description || pageData.description || 'Free Joomla 5+ extension with 130+ automated health checks for security, performance, SEO, and database.'
252+
const description = pageData.frontmatter?.description || pageData.description || 'Monitor your Joomla 5 site with 130+ automated health checks. Scan security, performance, SEO, sitemaps, and database issues in seconds.'
253253

254254
// Build canonical URL
255255
let relativePath = pageData.relativePath || ''
@@ -258,6 +258,7 @@ export default defineConfig({
258258

259259
pageData.frontmatter.head ??= []
260260
pageData.frontmatter.head.push(
261+
['link', { rel: 'canonical', href: url }],
261262
['meta', { property: 'og:title', content: `${title} | Health Checker for Joomla` }],
262263
['meta', { property: 'og:description', content: description }],
263264
['meta', { property: 'og:url', content: url }],
@@ -327,16 +328,19 @@ export default defineConfig({
327328
transformItems: (items) => {
328329
// Filter out README
329330
items = items.filter(item => !item.url.includes('README'))
330-
// Add /docs prefix to all URLs (workaround for base path bug)
331+
// Add /docs prefix to all URLs and set lastmod for crawl priority
332+
const today = new Date().toISOString().split('T')[0]
331333
items = items.map(item => ({
332334
...item,
333-
url: item.url.startsWith('/') ? `/docs${item.url}` : `/docs/${item.url}`
335+
url: item.url.startsWith('/') ? `/docs${item.url}` : `/docs/${item.url}`,
336+
lastmod: item.lastmod || today
334337
}))
335338
// Add root page
336339
items.unshift({
337340
url: '/',
338341
changefreq: 'weekly',
339-
priority: 1.0
342+
priority: 1.0,
343+
lastmod: today
340344
})
341345
return items
342346
}

website/public/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Health Checker for Joomla - Instant Site Health Report</title>
6+
<title>Health Checker for Joomla - Free Site Monitoring & Health Checks</title>
77
<meta
88
name="description"
9-
content="Free Joomla 5+ extension with 130+ automated health checks for security, performance, SEO, and database. Instant reports from your admin panel."
9+
content="Monitor your Joomla 5 site with 130+ automated health checks. Scan security, performance, SEO, sitemaps, and database issues in seconds. Free and open source."
1010
/>
1111
<meta
1212
name="keywords"
@@ -39,11 +39,11 @@
3939
/>
4040
<meta
4141
property="og:title"
42-
content="Health Checker for Joomla - Instant Site Health Report"
42+
content="Health Checker for Joomla - Free Site Monitoring & Health Checks"
4343
/>
4444
<meta
4545
property="og:description"
46-
content="Free Joomla 5+ extension with 130+ automated health checks for security, performance, SEO, and database. Instant reports from your admin panel."
46+
content="Monitor your Joomla 5 site with 130+ automated health checks. Scan security, performance, SEO, sitemaps, and database issues in seconds. Free and open source."
4747
/>
4848
<meta
4949
property="og:image"
@@ -67,11 +67,11 @@
6767
/>
6868
<meta
6969
name="twitter:title"
70-
content="Health Checker for Joomla - Instant Site Health Report"
70+
content="Health Checker for Joomla - Free Site Monitoring & Health Checks"
7171
/>
7272
<meta
7373
name="twitter:description"
74-
content="Free Joomla 5+ extension with 130+ automated health checks for security, performance, SEO, and database. Instant reports from your admin panel."
74+
content="Monitor your Joomla 5 site with 130+ automated health checks. Scan security, performance, SEO, sitemaps, and database issues in seconds. Free and open source."
7575
/>
7676
<meta
7777
name="twitter:image"
@@ -1996,9 +1996,9 @@ <h3 class="text-base font-semibold mb-1">
19961996
>
19971997
A diagnostic tool for sites built with YOOtheme
19981998
Pro Builder. Verifies server requirements, checks
1999-
Joomla configuration settings, and reviews
2000-
YOOtheme Pro setup — identifying potential issues
2001-
and providing actionable recommendations.
1999+
Joomla configuration settings, and reviews your
2000+
YOOtheme Pro setup to flag problems with
2001+
specific fix suggestions.
20022002
</p>
20032003
<div class="flex flex-wrap gap-3">
20042004
<a

website/public/robots.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
User-agent: *
22
Allow: /
3+
Disallow: /docs/sitemap.xml
34

4-
Sitemap: https://www.joomlahealthchecker.com/docs/sitemap.xml
5+
Sitemap: https://www.joomlahealthchecker.com/sitemap.xml

website/src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ export default {
8484
newResponse.headers.set('Content-Type', 'text/html; charset=utf-8');
8585
}
8686

87+
// Prevent XML files (sitemaps) from being indexed as content pages
88+
if (url.pathname.endsWith('.xml')) {
89+
newResponse.headers.set('X-Robots-Tag', 'noindex');
90+
}
91+
8792
// Add security headers
8893
for (const [key, value] of Object.entries(securityHeaders)) {
8994
// Allow /docs/ to be framed by same origin (for search widget)

0 commit comments

Comments
 (0)