Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/docsPublic

Commitaadc2e9

Browse files
committed
feat: og
1 parentbf12a6b commitaadc2e9

File tree

6 files changed

+322
-8
lines changed

6 files changed

+322
-8
lines changed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ dist/
9999
.vitepress/dist
100100
.vitepress/cache
101101
.vitepress/.temp
102+
src/public/og
102103

103104
# Serverless directories
104105
.serverless/

‎.vitepress/config.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import {
1414
groupIconMdPlugin,
1515
groupIconVitePlugin
1616
}from'vitepress-plugin-group-icons'
17+
import{addOgImage}from'vitepress-plugin-og'
18+
import{withCtx}from'vue'
1719

1820
constnav:ThemeConfig['nav']=[
1921
{
@@ -610,15 +612,7 @@ export default defineConfigWithTheme<ThemeConfig>({
610612
content:'Vue.js - The Progressive JavaScript Framework'
611613
}
612614
],
613-
[
614-
'meta',
615-
{
616-
property:'og:image',
617-
content:'https://vuejs.org/images/logo.png'
618-
}
619-
],
620615
['meta',{name:'twitter:site',content:'@vuejs'}],
621-
['meta',{name:'twitter:card',content:'summary'}],
622616
[
623617
'link',
624618
{
@@ -759,6 +753,12 @@ export default defineConfigWithTheme<ThemeConfig>({
759753
}
760754
},
761755

756+
asynctransformPageData(pageData,ctx){
757+
awaitaddOgImage(pageData,ctx,{
758+
domain:'https://vuejs.org',
759+
})
760+
},
761+
762762
markdown:{
763763
theme:'github-dark',
764764
config(md){

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"typescript":"^5.6.3",
2626
"vitepress-plugin-group-icons":"^1.5.4",
2727
"vitepress-plugin-llms":"^0.0.8",
28+
"vitepress-plugin-og":"^0.0.3",
2829
"vue-tsc":"^2.1.6"
2930
},
3031
"packageManager":"pnpm@9.12.1"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp