File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,18 @@ export const generateStaticParams = generateStaticParamsFor('mdxPath')
66export async function generateMetadata ( props ) {
77 const params = await props . params ;
88 const { metadata } = await importPage ( params . mdxPath , params . lang ) ;
9- return metadata ;
9+ const pagePath = params . mdxPath ? params . mdxPath . join ( '/' ) : '' ;
10+ return {
11+ ...metadata ,
12+ alternates : {
13+ canonical : `https://webnn.io/${ params . lang } ${ pagePath ? '/' + pagePath : '' } ` ,
14+ languages : {
15+ 'en' : `https://webnn.io/en${ pagePath ? '/' + pagePath : '' } ` ,
16+ 'zh' : `https://webnn.io/zh${ pagePath ? '/' + pagePath : '' } ` ,
17+ 'x-default' : `https://webnn.io/en${ pagePath ? '/' + pagePath : '' } ` ,
18+ } ,
19+ } ,
20+ } ;
1021}
1122
1223const Wrapper = useMDXComponents ( ) . wrapper ;
Original file line number Diff line number Diff line change @@ -48,11 +48,6 @@ export const metadata = {
4848 } ,
4949 alternates : {
5050 canonical : './' ,
51- languages : {
52- 'en' : '/en' ,
53- 'zh' : '/zh' ,
54- 'x-default' : '/en' ,
55- } ,
5651 } ,
5752 robots : {
5853 index : true ,
Original file line number Diff line number Diff line change 11import { Playground } from '../../_components/playground'
22import { GoogleAnalytics } from '@next/third-parties/google'
33
4+ export async function generateMetadata ( props ) {
5+ const { lang } = await props . params ;
6+ return {
7+ alternates : {
8+ canonical : `https://webnn.io/${ lang } /playground` ,
9+ languages : {
10+ 'en' : 'https://webnn.io/en/playground' ,
11+ 'zh' : 'https://webnn.io/zh/playground' ,
12+ 'x-default' : 'https://webnn.io/en/playground' ,
13+ } ,
14+ } ,
15+ } ;
16+ }
17+
418export default function Page ( ) {
519 return (
620 < div >
Original file line number Diff line number Diff line change 11import { Showcases } from "../../_components/showcases/showcases.jsx"
22import { GoogleAnalytics } from '@next/third-parties/google'
33
4+ export async function generateMetadata ( props ) {
5+ const { lang } = await props . params ;
6+ return {
7+ alternates : {
8+ canonical : `https://webnn.io/${ lang } /showcase` ,
9+ languages : {
10+ 'en' : 'https://webnn.io/en/showcase' ,
11+ 'zh' : 'https://webnn.io/zh/showcase' ,
12+ 'x-default' : 'https://webnn.io/en/showcase' ,
13+ } ,
14+ } ,
15+ } ;
16+ }
17+
418export default async function Page ( ) {
519 return (
620 < div className = "md:px-8 xl:px-8" >
Original file line number Diff line number Diff line change 1+ ---
2+ title : WebNN Docs
3+ ---
4+
15import Netron from ' ../../app/_components/netron/netron'
26import Hero from ' ../../app/_components/home/hero'
37import HeroBackground from ' ../../app/_components/home/bg'
Original file line number Diff line number Diff line change 1+ ---
2+ title : WebNN 文档
3+ ---
4+
15import Netron from ' ../../app/_components/netron/netron'
26import HeroCh from ' ../../app/_components/home/hero-ch'
37import HeroBackground from ' ../../app/_components/home/bg'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ export { proxy } from 'nextra/locales'
2+
3+ export const config = {
4+ // Matcher for locale routing - includes root path
5+ matcher : [
6+ '/((?!api|_next/static|_next/image|favicon.ico|icon.svg|icon-512.png|apple-icon.png|android-chrome-512x512.png|manifest|_pagefind|llms.txt|netron|demos|robots.txt|sitemap.xml|.well-known).*)'
7+ ]
8+ }
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments