feat: add defaultDateType config
This commit is contained in:
		@@ -1,4 +1,5 @@
 | 
			
		||||
import { GlobalConfiguration } from "../../cfg"
 | 
			
		||||
import { getDate } from "../../components/Date"
 | 
			
		||||
import { FilePath, FullSlug, SimpleSlug, simplifySlug } from "../../util/path"
 | 
			
		||||
import { QuartzEmitterPlugin } from "../types"
 | 
			
		||||
import path from "path"
 | 
			
		||||
@@ -74,7 +75,7 @@ export const ContentIndex: QuartzEmitterPlugin<Partial<Options>> = (opts) => {
 | 
			
		||||
      const linkIndex: ContentIndex = new Map()
 | 
			
		||||
      for (const [_tree, file] of content) {
 | 
			
		||||
        const slug = file.data.slug!
 | 
			
		||||
        const date = file.data.dates?.modified ?? new Date()
 | 
			
		||||
        const date = getDate(ctx.cfg.configuration, file.data) ?? new Date()
 | 
			
		||||
        if (opts?.includeEmptyFiles || (file.data.text && file.data.text !== "")) {
 | 
			
		||||
          linkIndex.set(slug, {
 | 
			
		||||
            title: file.data.frontmatter?.title!,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user