Skip to content

Commit e315bcd

Browse files
committed
fix: sort by updated/date, close #614
1 parent 287cef1 commit e315bcd

File tree

14 files changed

+682
-450
lines changed

14 files changed

+682
-450
lines changed

demo/custom/pages/links/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 我的小伙伴们
33
keywords: 链接
44
description: 云游的小伙伴们
5-
links: https://www.yunyoujun.cn/friends/links.json
5+
links: https://friends.yunyoujun.cn/links.json
66
random: true
77
---
88

demo/yun/pages/posts/code.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title:
44
zh-CN: 代码块测试
55
categories:
66
- $locale:category.test
7+
updated: 2024-07-10T00:00:00.000Z
78
---
89

910
```dockerfile [Sample.dockerfile]

demo/yun/pages/posts/markdown.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ categories:
66
- $locale:category.test
77
- Markdown
88
excerpt_type: html
9+
updated: 2024-06-11T00:00:00.000Z
910
---
1011

1112
::: tip

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"version": "0.26.6",
55
"private": true,
6-
"packageManager": "pnpm@10.18.3",
6+
"packageManager": "pnpm@10.19.0",
77
"description": "📄 Vite & Vue powered static blog generator.",
88
"author": {
99
"email": "me@yunyoujun.cn",
@@ -81,24 +81,24 @@
8181
"valaxy-theme-yun": "workspace:*"
8282
},
8383
"devDependencies": {
84-
"@antfu/eslint-config": "^6.0.0",
84+
"@antfu/eslint-config": "^6.1.0",
8585
"@iconify-json/logos": "catalog:build",
8686
"@iconify-json/vscode-icons": "catalog:build",
87-
"@microsoft/api-extractor": "^7.53.1",
87+
"@microsoft/api-extractor": "^7.53.3",
8888
"@playwright/test": "^1.56.1",
8989
"@types/debug": "^4.1.12",
9090
"@types/fs-extra": "^11.0.4",
9191
"@types/markdown-it-attrs": "^4.1.3",
9292
"@types/markdown-it-container": "^2.0.10",
9393
"@types/markdown-it-emoji": "^3.0.1",
94-
"@types/node": "^24.8.1",
94+
"@types/node": "^24.9.1",
9595
"@types/prompts": "^2.4.9",
9696
"bumpp": "^10.3.1",
9797
"cross-env": "^10.1.0",
9898
"eslint": "^9.38.0",
9999
"https-localhost": "^4.7.1",
100100
"husky": "^9.1.7",
101-
"lint-staged": "^16.2.4",
101+
"lint-staged": "^16.2.6",
102102
"npm-run-all": "^4.1.5",
103103
"prompts": "^2.4.2",
104104
"rimraf": "^6.0.1",
@@ -110,7 +110,7 @@
110110
"typescript": "catalog:build",
111111
"unbuild": "catalog:build",
112112
"vite-node": "^3.2.4",
113-
"vitest": "^3.2.4",
113+
"vitest": "^4.0.4",
114114
"vue-tsc": "2.2.0",
115115
"zx": "catalog:build"
116116
},

packages/create-valaxy/template-blog/pages/links/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 我的小伙伴们
33
keywords: 链接
44
description: 云游的小伙伴们
5-
links: https://www.yunyoujun.cn/friends/links.json
5+
links: https://friends.yunyoujun.cn/links.json
66
random: true
77
---
88

packages/devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"dependencies": {
3737
"@rollup/pluginutils": "^5.3.0",
38-
"axios": "^1.12.2",
38+
"axios": "^1.13.0",
3939
"body-parser": "^2.2.0",
4040
"cors": "^2.8.5",
4141
"http-proxy-middleware": "^3.0.5",

packages/devtools/src/node/functions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export function getFunctions(server: ViteDevServer, devtoolsOptions: ValaxyDevto
4848
return {
4949
// sort by updated
5050
posts: posts.sort((a, b) => {
51-
const bDateValue = dayjs(b.frontmatter.date).valueOf()
52-
const aDateValue = dayjs(a.frontmatter.date).valueOf()
51+
const bDateValue = dayjs(b.frontmatter.updated || b.frontmatter.date).valueOf()
52+
const aDateValue = dayjs(a.frontmatter.updated || a.frontmatter.date).valueOf()
5353
return bDateValue - aDateValue
5454
}),
5555
root: userRoot,

packages/valaxy-addon-abbrlink/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"crc": "^4.3.2"
1818
},
1919
"devDependencies": {
20-
"vitest": "^3.2.4"
20+
"vitest": "^4.0.4"
2121
}
2222
}

packages/valaxy/client/composables/categories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRef } from '@vueuse/core'
1+
import type { MaybeRef } from 'vue'
22
import type { Post } from '../../types'
33
import { computed, unref } from 'vue'
44
import { useSiteStore } from '../stores'

packages/valaxy/client/composables/search/useFuseSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { UseFuseOptions } from '@vueuse/integrations/useFuse'
2-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter } from 'vue'
33
import type { FuseListItem } from '../../../types'
44
import { useFuse } from '@vueuse/integrations/useFuse'
55
import { useSiteConfig } from 'valaxy'

0 commit comments

Comments
 (0)