Skip to content

Commit

Permalink
fix: dynamically include jobs in sitemap.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Feb 12, 2025
1 parent 80d1af2 commit e89daed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions content.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type CollectionSource, type DefinedCollection, defineCollection, defineContentConfig, z } from '@nuxt/content';
import { asSitemapCollection } from '@nuxtjs/sitemap/content';

const DOCUMENTS = 'content/documents/*.md';
const JOBS = 'content/jobs/*.md';
Expand Down Expand Up @@ -52,11 +53,11 @@ function getDocumentsCollection(dataOrigin: 'remote' | 'local'): DefinedCollecti
}

function getJobsCollection(dataOrigin: 'remote' | 'local'): DefinedCollection {
return defineCollection({
return defineCollection(asSitemapCollection({
schema: jobSchema,
source: getSource(JOBS, dataOrigin),
type: 'page',
});
}));
}

function getTestimonialsCollection(dataOrigin: 'remote' | 'local'): DefinedCollection {
Expand Down

0 comments on commit e89daed

Please sign in to comment.