Skip to content

Commit

Permalink
🎨 Update incorrect address.
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Aug 4, 2023
1 parent 791aeba commit 4d857d6
Show file tree
Hide file tree
Showing 3 changed files with 7,556 additions and 5 deletions.
6 changes: 2 additions & 4 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ function defaultLayoutPlugin() {

//这里也可以直接在 frontmatter,赋值给 date 字段
if (!date) {
const createDate = dayjs(fs.statSync(filePath).birthtime).format(
'YYYY/MM/DD',
);
const createDate = dayjs(fs.statSync(filePath).birthtime).format('YYYY/MM/DD');
//这里特殊处理了下,因为之前的weekly迁移过来后,createDate不对了,通过规律重写了下,100期以后直接读取
if (SITE.repo == 'tw93/weekly') {
const num = filePath.split('/posts/')[1].split('-')[0];
Expand All @@ -65,6 +63,6 @@ export default defineConfig({
integrations: [react(), tailwind()],
markdown: {
remarkPlugins: [defaultLayoutPlugin],
extendDefaultPlugins: true
extendDefaultPlugins: true,
},
});
Loading

0 comments on commit 4d857d6

Please sign in to comment.