Prechádzať zdrojové kódy

add readme;rename file and url

mrh 1 rok pred
rodič
commit
008f19e4da

+ 2 - 1
.gitignore

@@ -1,2 +1,3 @@
 node_modules/
-.vitepress/cache/
+.vitepress/cache/
+.vitepress/dist

+ 9 - 2
.vitepress/config.mts

@@ -3,14 +3,21 @@ import sidebar from './sidebar.json'; // 生成的侧边栏配置文件
 
 export default defineConfig({
   lang: 'zh-CN',
-  title: 'md.magong.site',
+  title: 'wd.magong.site',
   description: '这是我的项目文档',
   themeConfig: {
     nav: [
-      { text: '文档', link: '/recent/index' },
+      { text: '文档', link: '/' },
       { text: 'AI工具', link: '/ai-tools/program' },
       { text: '联系方式', link: '/contact/my-contact' }
     ],
     sidebar: sidebar,
+    lastUpdated: {
+      text: '最后修改于',
+      formatOptions: {
+        dateStyle: 'full',
+        timeStyle: 'medium'
+      }
+    },
   },
 });

+ 6 - 10
.vitepress/sidebar.json

@@ -5,13 +5,11 @@
       "items": [
         {
           "text": "豆包MarsCode 2024-10-24",
-          "link": "/recent/index",
-          "date": "2024-10-24T00:00:00.000Z"
+          "link": "/recent/2024-10-24_MarsCode"
         },
         {
-          "text": "命令行助手 aider",
-          "link": "/recent/aider",
-          "date": "2024-10-01T00:00:00.000Z"
+          "text": "命令行助手 aider 2024-10-01",
+          "link": "/recent/2024-10-01_aider"
         }
       ]
     }
@@ -22,8 +20,7 @@
       "items": [
         {
           "text": "program",
-          "link": "/ai-tools/program",
-          "date": null
+          "link": "/ai-tools/program"
         }
       ]
     }
@@ -33,9 +30,8 @@
       "text": "",
       "items": [
         {
-          "text": "my-contact",
-          "link": "/contact/my-contact",
-          "date": null
+          "text": "社交媒体",
+          "link": "/contact/my-contact"
         }
       ]
     }

+ 4 - 0
contact/my-contact.md

@@ -1,3 +1,7 @@
+---
+title: 社交媒体
+date: 2024-10-24
+---
 # 联系方式
 
 ## 抖音

+ 3 - 1
index.md

@@ -3,5 +3,7 @@ layout: false
 ---
 
 <script>
-  window.location.href = '/recent/';
+  if (typeof window !== 'undefined') {
+  window.location.href = '/recent/2024-10-24_MarsCode';
+}
 </script>

+ 4 - 2
package.json

@@ -2,7 +2,8 @@
   "devDependencies": {
     "vite-plugin-restart": "^0.4.1",
     "vite-plugin-watch": "^0.3.1",
-    "vitepress": "^1.4.1"
+    "vitepress": "^1.4.1",
+    "wrangler": "^3.82.0"
   },
   "scripts": {
     "docs:dev": "vitepress dev",
@@ -10,6 +11,7 @@
     "docs:preview": "vitepress preview"
   },
   "dependencies": {
-    "gray-matter": "^4.0.3"
+    "gray-matter": "^4.0.3",
+    "vue": "^3.5.12"
   }
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 566 - 2
pnpm-lock.yaml


+ 9 - 0
readmd.md

@@ -0,0 +1,9 @@
+
+```shell
+# 列出所有文件,不包括.gitignore 中的文件
+git ls-files --exclude-standard
+
+# 部署
+npx wrangler pages deploy .vitepress\dist
+npx wrangler pages deploy .vitepress\dist --branch=production
+```

+ 1 - 1
recent/aider.md → recent/2024-10-01_aider.md

@@ -1,5 +1,5 @@
 ---
-title: 命令行助手 aider
+title: 命令行助手 aider 2024-10-01
 date: 2024-10-01
 ---
 

+ 6 - 3
recent/index.md → recent/2024-10-24_MarsCode.md

@@ -2,24 +2,27 @@
 title: 豆包MarsCode 2024-10-24
 date: 2024-10-24
 ---
-# 快速开始
+# AI程序员辅助编程 --豆包MarsCode
 ## 安装豆包Marscode
-访问字节跳动的豆包AI编程助手,使用邀请链接,你我都可以获得**12元邀请奖励**(活动时间 2024.10.11-10.31):
+访问字节跳动的豆包AI编程助手,使用下方邀请链接,你我都可以获得<font color="red">**12元邀请奖励**</font>(活动时间 2024.10.11-10.31):
 
 https://www.marscode.cn/events/s/iSAc9RmH/
 
-注册成功后,按照[豆包Marscode的教程](https://www.marscode.cn/home?active_tab=vscode),下载安装 vscode 和 MarsCode 插件 - 在窗口左侧的 MarsCode 图标,登录授权,即可开始聊天。
+注册成功后,按照[豆包Marscode的官方教程](https://www.marscode.cn/home?active_tab=vscode),下载安装 vscode 和 MarsCode 插件 - 在窗口左侧的 MarsCode 图标,登录授权,即可开始聊天。
 
 
 ## 安装 Python
 
 通常我们可以在Python官网安装单个Python版本,也可以用 miniconda 来安装不同的 Python 版本,推荐用 miniconda。
 
+### 命令行安装
 在 vscode 中按 `Ctrl + ~` (按键 `~`在 `Tab` 上边),输入以下指令安装 miniconda 版本管理器:
 ```shell
 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -o miniconda.exe
 start /wait "" .\miniconda.exe /S
 del miniconda.exe
 ```
+
+### 手动下载安装包
 你也可以访问 miniconda 官网手动下载安装: https://docs.anaconda.com/miniconda/ ,在页面中央,点击下载对应操作系统的 miniconda ,例如: `Miniconda3 Windows 64-bit` 下载安装。
 

+ 0 - 1
scripts/generateSidebar.js

@@ -29,7 +29,6 @@ function generateSidebar(dir) {
   return files.map(file => ({
     text: file.title,
     link: `/${path.relative('.', dir)}/${file.name.replace('.md', '')}`,
-    date: file.date // 将 date 字段保存到 sidebar.json 中
   }));
 }
 

+ 2 - 2
vite.config.js

@@ -7,6 +7,6 @@ export default defineConfig({
       pattern: '**/*.{md,js,ts,mts}', // 监听所有 Markdown、JavaScript、TypeScript 和 mts 文件
       command: 'node scripts/generateSidebar.js', // 文件变化时执行的命令
       ignore: '.vitepress/sidebar.json' // 忽略 sidebar.json 文件的变化
-    })
+    }),
   ]
-});
+});

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov