refactor: move pubDate to date in posts front matter
This commit is contained in:
parent
123da1747f
commit
b2270003bd
15 changed files with 21 additions and 22 deletions
|
@ -34,7 +34,7 @@ const author = Array.isArray(entry.data.author) ? entry.data.author : (entry.dat
|
|||
const wordcount = remarkPluginFrontmatter.wordcount;
|
||||
const lastUpdated = remarkPluginFrontmatter.lastModified;
|
||||
|
||||
const pubDate = new Date(entry.data.pubDate).toISOString().split('T')[0]
|
||||
const pubDate = new Date(entry.data.date).toISOString().split('T')[0]
|
||||
const lastUpdatedDate = new Date(lastUpdated).toISOString().split('T')[0]
|
||||
|
||||
// Get author data
|
||||
|
|
|
@ -11,7 +11,7 @@ export async function GET({ props }) {
|
|||
const { entry } = props;
|
||||
// Format the content as plain text
|
||||
const title = entry.data.title;
|
||||
const date = entry.data.pubDate.toISOString().split('T')[0];
|
||||
const date = entry.data.date.toISOString().split('T')[0];
|
||||
const content = entry.body;
|
||||
|
||||
// Combine the post info and body into a single text file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue