mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-31 00:34:05 -06:00
modified content meta
This commit is contained in:
parent
f301fc0b47
commit
1a5d13da09
@ -27,11 +27,25 @@ export default ((opts?: Partial<ContentMetaOptions>) => {
|
|||||||
const text = fileData.text
|
const text = fileData.text
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
const segments: (string | JSX.Element)[] = []
|
var modifiedSegment: string = ""
|
||||||
|
var createdSegment: string = ""
|
||||||
|
const fileRelativePath = fileData.filePath
|
||||||
|
//const segments: (string | JSX.Element)[] = []
|
||||||
|
|
||||||
if (fileData.dates) {
|
if (fileData.dates) {
|
||||||
segments.push(formatDate(getDate(cfg, fileData)!, cfg.locale))
|
const cfgDefaultDataType = cfg.defaultDateType // For backward compatibility, just in case this is used somewhere else by the original author
|
||||||
|
//segments.push(formatDate(getDate(cfg, fileData)!, cfg.locale))
|
||||||
}
|
}
|
||||||
|
if (fileData.dates.created) {
|
||||||
|
cfg.defaultDateType = "created"
|
||||||
|
createdSegment = formatDate(getDate(cfg, fileData)!)
|
||||||
|
}
|
||||||
|
if (fileData.dates.modified) {
|
||||||
|
cfg.defaultDateType = "modified"
|
||||||
|
modifiedSegment = formatDate(getDate(cfg, fileData)!)
|
||||||
|
}
|
||||||
|
cfg.defaultDateType = cfgDefaultDataType
|
||||||
|
|
||||||
|
|
||||||
// Display reading time if enabled
|
// Display reading time if enabled
|
||||||
if (options.showReadingTime) {
|
if (options.showReadingTime) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user