14 blog post schedule
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user