Skip to content

Commit

Permalink
use clean urls
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 12, 2023
1 parent d2d53d6 commit 9850fee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vitepress/config.ts
Expand Up @@ -3,6 +3,7 @@ import { defineConfig } from 'vitepress'
export default defineConfig({
title: 'The Vue Point',
description: 'The offical blog for the Vue.js project',
cleanUrls: true,
head: [
['meta', { name: 'twitter:site', content: '@vuejs' }],
['meta', { name: 'twitter:card', content: 'summary' }],
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/posts.data.ts
Expand Up @@ -59,7 +59,7 @@ function getPost(file: string, postDir: string, asFeed = false): Post {

const post: Post = {
title: data.title,
href: `/posts/${file.replace(/\.md$/, '.html')}`,
href: `/posts/${file.replace(/\.md$/, '')}`,
date: formatDate(data.date),
excerpt: excerpt && md.render(excerpt)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
"gray-matter": "^4.0.2",
"tailwindcss": "^3.1.8",
"tsx": "^3.8.2",
"vitepress": "^1.0.0-alpha.50",
"vitepress": "^1.0.0-alpha.52",
"vue": "^3.2.47"
}
}
1 change: 1 addition & 0 deletions vercel.json
@@ -1,4 +1,5 @@
{
"cleanUrls": true,
"headers": [
{
"source": "/assets/(.*)",
Expand Down

0 comments on commit 9850fee

Please sign in to comment.