This commit is contained in:
Timo Knuth
2026-01-16 14:41:42 +01:00
parent 2879fd0d8e
commit 2dec18fc97
7 changed files with 861 additions and 80 deletions

View File

@@ -54,7 +54,7 @@ export default function BulkQRCodeGeneratorPage() {
title: 'Contact Cards',
description: 'Create vCard QR codes with contact information',
format: 'FirstName,LastName,Email,Phone,Organization,Title',
example: 'John Doe,VCARD,John,Doe,john@example.com,+1234567890,Company Inc,CEO',
example: 'John Doe,VCARD,John,Doe,john' + '@' + 'example.com,+1234567890,Company Inc,CEO',
},
{
type: 'GEO',
@@ -448,7 +448,7 @@ export default function BulkQRCodeGeneratorPage() {
<tr className="border-b border-gray-200">
<td className="py-2 px-3">John Doe</td>
<td className="py-2 px-3">VCARD</td>
<td className="py-2 px-3">John,Doe,john@example.com,+1234567890,Company,CEO</td>
<td className="py-2 px-3">John,Doe,john{'@'}example.com,+1234567890,Company,CEO</td>
<td className="py-2 px-3">contact</td>
</tr>
<tr className="border-b border-gray-200">

View File

@@ -20,9 +20,10 @@ export function ObfuscatedMailto({ email, className, children }: ObfuscatedMailt
setIsMounted(true);
}, []);
// Before hydration, render as plain text/span to avoid Cloudflare manipulation
// Before hydration, render as obfuscated text to avoid Cloudflare manipulation
if (!isMounted) {
return <span className={className}>{children || email}</span>;
const obfuscatedEmail = email.replace('@', ' [at] ').replace(/\./g, ' [dot] ');
return <span className={className}>{children || obfuscatedEmail}</span>;
}
// After hydration, render as a proper mailto link

83
src/lib/indexnow.ts Normal file
View File

@@ -0,0 +1,83 @@
import axios from 'axios';
import dotenv from 'dotenv';
import { blogPostList } from '../lib/blog-data';
dotenv.config();
const INDEXNOW_ENDPOINT = 'https://api.indexnow.org/indexnow';
const HOST = 'www.qrmaster.net';
// You need to generate a key from https://www.bing.com/indexnow and place it in your public folder
// For now, we'll assume a key exists or is provided via env
const KEY = process.env.INDEXNOW_KEY || 'your-indexnow-key';
const KEY_LOCATION = `https://${HOST}/${KEY}.txt`;
export async function submitToIndexNow(urls: string[]) {
try {
const payload = {
host: HOST,
key: KEY,
keyLocation: KEY_LOCATION,
urlList: urls,
};
console.log(`Submitting ${urls.length} URLs to IndexNow...`);
const response = await axios.post(INDEXNOW_ENDPOINT, payload, {
headers: {
'Content-Type': 'application/json',
},
});
if (response.status === 200 || response.status === 202) {
console.log('✅ Successfully submitted URLs to IndexNow.');
} else {
console.error(`⚠️ IndexNow submission returned status: ${response.status}`);
}
} catch (error) {
if (axios.isAxiosError(error)) {
console.error('❌ Error submitting to IndexNow:', error.message);
console.error('Response data:', error.response?.data);
} else {
console.error('❌ Unknown error submitting to IndexNow:', error);
}
}
}
// Function to gather all indexable URLs
export function getAllIndexableUrls(): string[] {
const baseUrl = `https://${HOST}`;
// Free tools
const freeTools = [
'url-qr-code', 'vcard-qr-code', 'text-qr-code', 'email-qr-code', 'sms-qr-code',
'wifi-qr-code', 'crypto-qr-code', 'event-qr-code', 'facebook-qr-code',
'instagram-qr-code', 'twitter-qr-code', 'youtube-qr-code', 'whatsapp-qr-code',
'tiktok-qr-code', 'geolocation-qr-code', 'phone-qr-code', 'paypal-qr-code',
'zoom-qr-code', 'teams-qr-code',
].map(slug => `${baseUrl}/tools/${slug}`);
// Blog posts
const blogPages = blogPostList.map(post => `${baseUrl}/blog/${post.slug}`);
// Main pages
const mainPages = [
baseUrl,
`${baseUrl}/qr-code-erstellen`,
`${baseUrl}/qr-code-tracking`,
`${baseUrl}/pricing`,
`${baseUrl}/bulk-qr-code-generator`,
`${baseUrl}/dynamic-qr-code-generator`,
`${baseUrl}/reprint-calculator`,
`${baseUrl}/faq`,
`${baseUrl}/blog`,
`${baseUrl}/signup`,
`${baseUrl}/login`,
];
return [...mainPages, ...freeTools, ...blogPages];
}
// If run directly
if (require.main === module) {
const urls = getAllIndexableUrls();
submitToIndexNow(urls);
}