14 blog post schedule

This commit is contained in:
Timo Knuth
2026-01-26 16:43:47 +01:00
parent 702e2710de
commit 2771faf3ba
44 changed files with 3561 additions and 2174 deletions

View File

@@ -1,14 +1,16 @@
import axios from 'axios';
import dotenv from 'dotenv';
import { blogPostList } from '../lib/blog-data';
import { blogPosts } from '../lib/blog-data';
import { pillarMeta } from '../lib/pillar-data';
import { authors } from '../lib/author-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 || 'bb6dfaacf1ed41a880281c426c54ed7c';
// Key must be set in .env as INDEXNOW_KEY
const KEY = process.env.INDEXNOW_KEY!;
const KEY_LOCATION = `https://${HOST}/${KEY}.txt`;
export async function submitToIndexNow(urls: string[]) {
@@ -57,7 +59,7 @@ export function getAllIndexableUrls(): string[] {
].map(slug => `${baseUrl}/tools/${slug}`);
// Blog posts
const blogPages = blogPostList.map(post => `${baseUrl}/blog/${post.slug}`);
const blogPages = blogPosts.map(post => `${baseUrl}/blog/${post.slug}`);
// Main pages (synced with sitemap.ts)
const mainPages = [
@@ -82,7 +84,16 @@ export function getAllIndexableUrls(): string[] {
`${baseUrl}/guide/qr-code-best-practices`,
];
return [...mainPages, ...freeTools, ...blogPages];
// Learn hub and pillar pages
const learnPages = [
`${baseUrl}/learn`,
...pillarMeta.map(pillar => `${baseUrl}/learn/${pillar.key}`)
];
// Author pages
const authorPages = authors.map(author => `${baseUrl}/authors/${author.slug}`);
return [...mainPages, ...freeTools, ...blogPages, ...learnPages, ...authorPages];
}
// If run directly