Skip to content

Commit

Permalink
feat: 内容优化,发布问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
wujieli0207 committed Apr 30, 2024
1 parent 8c57db1 commit f9febd8
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 22 deletions.
18 changes: 9 additions & 9 deletions app/tag-data.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"个人成长_人生哲学": 3,
"读书笔记": 1,
"前端_工程化_状态管理": 4,
"前端_react": 2,
"个人成长_复盘": 4,
"个人成长_人生哲学": 3,
"前端_vite": 5,
"计算机基础_设计模式": 1,
"前端_vue": 10,
"前端_性能优化": 4,
"前端_工程化_规范": 2,
"前端_css": 1,
"前端_开发实践": 2,
"计算机基础_网络": 1,
"前端_javascript": 3
"前端_工程化_规范": 2,
"前端_javascript": 3,
"计算机基础_设计模式": 1,
"前端_性能优化": 4,
"前端_react": 2,
"前端_vite": 6,
"前端_vue": 10,
"前端_工程化_状态管理": 4
}
6 changes: 1 addition & 5 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ export default function Footer() {
<div>{` • `}</div>
<Link href="/">{siteMetadata.title}</Link>
</div>
<div className="mb-8 text-sm text-gray-500 dark:text-gray-400">
<Link href="https://github.com/timlrx/tailwind-nextjs-starter-blog">
Tailwind Nextjs Theme
</Link>
</div>
<div className="mb-8 text-sm text-gray-500 dark:text-gray-400">岁月神偷,不忘初心</div>
</div>
</footer>
)
Expand Down
2 changes: 1 addition & 1 deletion components/SectionContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ interface Props {

export default function SectionContainer({ children }: Props) {
return (
<section className="mx-auto max-w-3xl px-4 sm:px-6 xl:max-w-5xl xl:px-0">{children}</section>
<section className="mx-auto max-w-4xl px-4 sm:px-6 xl:max-w-5xl xl:px-0">{children}</section>
)
}
2 changes: 1 addition & 1 deletion data/authors/default.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: wujieli
name: 两万焦
avatar: /static/images/avatar.png
occupation: 独立开发者
company: 一人公司
Expand Down
2 changes: 1 addition & 1 deletion data/blog/front/engineering/clean-code-lint-standard.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 前端代码整洁之道:lint 标准化
date: 2022-07-19
date: '2022-07-19'
tags: ['前端/工程化/规范']
draft: false
---
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion data/siteMetadata.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import("pliny/config").PlinyConfig } */
const siteMetadata = {
title: '旅行者计划',
author: 'wujieli',
author: '两万焦',
headerTitle: '旅行者计划',
description: '人们会被自己热爱的事物改变,而没有人因为给予而贫穷',
language: 'zh-CN',
Expand Down
Binary file modified public/static/images/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions scripts/rss.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const generateRss = (config, posts, page = 'feed.xml') => `
<language>${config.language}</language>
<managingEditor>${config.email} (${config.author})</managingEditor>
<webMaster>${config.email} (${config.author})</webMaster>
<lastBuildDate>${new Date(posts[0].date).toUTCString()}</lastBuildDate>
<lastBuildDate>${new Date(posts[0]?.date).toUTCString()}</lastBuildDate>
<atom:link href="${config.siteUrl}/${page}" rel="self" type="application/rss+xml"/>
${posts.map((post) => generateRssItem(config, post)).join('')}
</channel>
Expand All @@ -45,9 +45,7 @@ async function generateRSS(config, allBlogs, page = 'feed.xml') {

if (publishPosts.length > 0) {
for (const tag of Object.keys(tagData)) {
const filteredPosts = allBlogs.filter((post) =>
post.tags.map((t) => slug(t)).includes(tag)
)
const filteredPosts = allBlogs.filter((post) => post.tags.map((t) => slug(t)).includes(tag))
const rss = generateRss(config, filteredPosts, `tags/${tag}/${page}`)
const rssPath = path.join('public', 'tags', tag)
mkdirSync(rssPath, { recursive: true })
Expand Down

0 comments on commit f9febd8

Please sign in to comment.