[{"data":1,"prerenderedAt":1399,"buildId":1400},["ShallowReactive",2],{"-docs-guide-i18n-description":3,"docs--docs-guide-i18n":16,"docs-navigation-zh-CN":1067,"mdc--tctnej-key":1387,"surround--docs-guide-i18n":1396},{"data":4,"body":5},{},{"type":6,"children":7},"root",[8],{"type":9,"tag":10,"props":11,"children":12},"element","p",{},[13],{"type":14,"value":15},"text","用 @nuxtjs\u002Fi18n 配置多语言文档、界面翻译和 hreflang 链接。",{"id":17,"title":18,"body":19,"category":1055,"description":15,"difficulty":1056,"extension":1057,"index":1058,"keywords":1056,"links":1056,"meta":1059,"navigation":1060,"path":1062,"requires":1056,"seo":1063,"sitemap":1064,"stem":1065,"__hash__":1066},"docs\u002Fdocs\u002F2.guide\u002F7.i18n.md","国际化",{"type":20,"value":21,"toc":1036},"minimark",[22,26,29,73,84,87,97,155,169,172,179,184,249,255,263,382,413,432,435,446,453,456,467,589,608,611,617,641,648,650,660,684,737,747,750,772,786,853,864,878,881,893,897,904,926,946,959,994,998,1007,1032],[23,24,25],"h2",{"id":25},"两种模式",[10,27,28],{},"国际化是按需启用的：",[30,31,32,53],"ul",{},[33,34,35,39,40,44,45,48,49,52],"li",{},[36,37,38],"strong",{},"单语言","（默认）：不安装 ",[41,42,43],"code",{},"@nuxtjs\u002Fi18n","，URL 不带语言前缀，界面文案取自内置翻译，语言由 ",[41,46,47],{},"app.config"," 的 ",[41,50,51],{},"i18n.locale"," 决定。",[33,54,55,58,59,48,62,65,66,68,69,72],{},[36,56,57],{},"多语言","：在 ",[41,60,61],{},"nuxt.config.ts",[41,63,64],{},"modules"," 中加入 ",[41,67,43],{}," 并配置 ",[41,70,71],{},"i18n.locales"," 后，Layer 自动启用本地化路由、按语言划分的内容集合、语言切换器与 hreflang。",[10,74,75,76,83],{},"两种模式下，组件与页面都通过 ",[77,78,80],"a",{"href":79},"\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-movk-i18n",[41,81,82],{},"useMovkI18n()"," 读取当前语言、翻译与本地化路径，调用方无需判断是否启用了 i18n。",[23,85,86],{"id":86},"单语言站点",[10,88,89,90,93,94,96],{},"只需切换界面语言时，在 ",[41,91,92],{},"app.config.ts"," 中设置 ",[41,95,51],{},"：",[98,99,105],"pre",{"className":100,"code":101,"filename":102,"language":103,"meta":104,"style":104},"language-ts shiki shiki-themes github-light github-light github-dark","export default defineAppConfig({\n  i18n: {\n    locale: 'en'\n  }\n})\n","app\u002Fapp.config.ts","ts","",[41,106,107,127,133,143,149],{"__ignoreMap":104},[108,109,112,116,119,123],"span",{"class":110,"line":111},"line",1,[108,113,115],{"class":114},"s8jYJ","export",[108,117,118],{"class":114}," default",[108,120,122],{"class":121},"snPdu"," defineAppConfig",[108,124,126],{"class":125},"sxrX7","({\n",[108,128,130],{"class":110,"line":129},2,[108,131,132],{"class":125},"  i18n: {\n",[108,134,136,139],{"class":110,"line":135},3,[108,137,138],{"class":125},"    locale: ",[108,140,142],{"class":141},"sIIMD","'en'\n",[108,144,146],{"class":110,"line":145},4,[108,147,148],{"class":125},"  }\n",[108,150,152],{"class":110,"line":151},5,[108,153,154],{"class":125},"})\n",[10,156,157,158,161,162,164,165,168],{},"默认值为 ",[41,159,160],{},"zh-CN","。内置翻译目前提供 ",[41,163,160],{}," 与 ",[41,166,167],{},"en"," 两种，它决定目录标题、编辑链接、搜索、AI 助手等界面文案。",[23,170,171],{"id":171},"多语言站点",[173,174,176,177],"h3",{"id":175},"安装-nuxtjsi18n","安装 ",[41,178,43],{},[10,180,181,183],{},[41,182,43],{}," 是 Layer 的可选 peer 依赖，需要在项目中安装：",[185,186,188,206,221,235],"code-group",{"sync":187},"package-manager",[98,189,194],{"className":190,"code":191,"filename":192,"language":193,"meta":104,"style":104},"language-bash shiki shiki-themes github-light github-light github-dark","pnpm add @nuxtjs\u002Fi18n\n","pnpm","bash",[41,195,196],{"__ignoreMap":104},[108,197,198,200,203],{"class":110,"line":111},[108,199,192],{"class":121},[108,201,202],{"class":141}," add",[108,204,205],{"class":141}," @nuxtjs\u002Fi18n\n",[98,207,210],{"className":190,"code":208,"filename":209,"language":193,"meta":104,"style":104},"npm install @nuxtjs\u002Fi18n\n","npm",[41,211,212],{"__ignoreMap":104},[108,213,214,216,219],{"class":110,"line":111},[108,215,209],{"class":121},[108,217,218],{"class":141}," install",[108,220,205],{"class":141},[98,222,225],{"className":190,"code":223,"filename":224,"language":193,"meta":104,"style":104},"yarn add @nuxtjs\u002Fi18n\n","yarn",[41,226,227],{"__ignoreMap":104},[108,228,229,231,233],{"class":110,"line":111},[108,230,224],{"class":121},[108,232,202],{"class":141},[108,234,205],{"class":141},[98,236,239],{"className":190,"code":237,"filename":238,"language":193,"meta":104,"style":104},"bun add @nuxtjs\u002Fi18n\n","bun",[41,240,241],{"__ignoreMap":104},[108,242,243,245,247],{"class":110,"line":111},[108,244,238],{"class":121},[108,246,202],{"class":141},[108,248,205],{"class":141},[173,250,252,253],{"id":251},"配置-nuxtconfigts","配置 ",[41,254,61],{},[10,256,257,258,65,260,262],{},"在 ",[41,259,64],{},[41,261,43],{},"，声明默认语言与语言列表：",[98,264,266],{"className":100,"code":265,"filename":61,"language":103,"meta":104,"style":104},"export default defineNuxtConfig({\n  extends: ['@movk\u002Fnuxt-docs'],\n\n  modules: ['@nuxtjs\u002Fi18n'],\n\n  i18n: {\n    defaultLocale: 'zh-CN',\n    locales: [\n      { code: 'zh-CN', name: '简体中文' },\n      { code: 'en', name: 'English' }\n    ]\n  }\n})\n",[41,267,268,279,290,296,306,310,315,327,333,350,366,372,377],{"__ignoreMap":104},[108,269,270,272,274,277],{"class":110,"line":111},[108,271,115],{"class":114},[108,273,118],{"class":114},[108,275,276],{"class":121}," defineNuxtConfig",[108,278,126],{"class":125},[108,280,281,284,287],{"class":110,"line":129},[108,282,283],{"class":125},"  extends: [",[108,285,286],{"class":141},"'@movk\u002Fnuxt-docs'",[108,288,289],{"class":125},"],\n",[108,291,292],{"class":110,"line":135},[108,293,295],{"emptyLinePlaceholder":294},true,"\n",[108,297,298,301,304],{"class":110,"line":145},[108,299,300],{"class":125},"  modules: [",[108,302,303],{"class":141},"'@nuxtjs\u002Fi18n'",[108,305,289],{"class":125},[108,307,308],{"class":110,"line":151},[108,309,295],{"emptyLinePlaceholder":294},[108,311,313],{"class":110,"line":312},6,[108,314,132],{"class":125},[108,316,318,321,324],{"class":110,"line":317},7,[108,319,320],{"class":125},"    defaultLocale: ",[108,322,323],{"class":141},"'zh-CN'",[108,325,326],{"class":125},",\n",[108,328,330],{"class":110,"line":329},8,[108,331,332],{"class":125},"    locales: [\n",[108,334,336,339,341,344,347],{"class":110,"line":335},9,[108,337,338],{"class":125},"      { code: ",[108,340,323],{"class":141},[108,342,343],{"class":125},", name: ",[108,345,346],{"class":141},"'简体中文'",[108,348,349],{"class":125}," },\n",[108,351,353,355,358,360,363],{"class":110,"line":352},10,[108,354,338],{"class":125},[108,356,357],{"class":141},"'en'",[108,359,343],{"class":125},[108,361,362],{"class":141},"'English'",[108,364,365],{"class":125}," }\n",[108,367,369],{"class":110,"line":368},11,[108,370,371],{"class":125},"    ]\n",[108,373,375],{"class":110,"line":374},12,[108,376,148],{"class":125},[108,378,380],{"class":110,"line":379},13,[108,381,154],{"class":125},[10,383,384,387,388,164,390,393,394,397,398,401,402,406,407,409,410,412],{},[41,385,386],{},"locales"," 中只写 ",[41,389,41],{},[41,391,392],{},"name","，不要声明 ",[41,395,396],{},"file","：Layer 会合并内置翻译与站点 ",[41,399,400],{},"i18n\u002Flocales\u002F"," 下的同名文件后统一注册（见 ",[77,403,405],{"href":404},"#%E7%AB%99%E7%82%B9%E7%BF%BB%E8%AF%91","站点翻译","）；声明 ",[41,408,396],{}," 时 ",[41,411,43],{}," 会自行加载该文件，文件不存在则构建失败。",[10,414,415,416,419,420,423,424,427,428,431],{},"路由策略由 Layer 固定为 ",[41,417,418],{},"prefix_except_default","，无需设置 ",[41,421,422],{},"strategy","：默认语言无前缀（",[41,425,426],{},"\u002Fdocs","），其他语言带前缀（",[41,429,430],{},"\u002Fen\u002Fdocs","）。",[173,433,434],{"id":434},"组织内容目录",[10,436,437,438,441,442,445],{},"默认语言的内容保持在 ",[41,439,440],{},"content\u002F"," 根目录，其他语言放在 ",[41,443,444],{},"content\u002F{code}\u002F"," 下，目录结构一一对应：",[98,447,451],{"className":448,"code":450,"language":14,"meta":104},[449],"language-text","content\u002F\n├── index.md              # 默认语言首页 → \u002F\n├── docs\u002F                 # 默认语言文档 → \u002Fdocs\u002F*\n│   └── 1.getting-started\u002F\n│       └── 1.index.md\n├── releases.yml          # 默认语言版本发布页（可选）\n└── en\u002F\n    ├── index.md          # 英文首页 → \u002Fen\n    ├── docs\u002F             # 英文文档 → \u002Fen\u002Fdocs\u002F*\n    │   └── 1.getting-started\u002F\n    │       └── 1.index.md\n    └── releases.yml      # 英文版本发布页（可选）\n",[41,452,450],{"__ignoreMap":104},[23,454,455],{"id":455},"内容集合",[10,457,458,459,462,463,466],{},"Layer 为每种语言生成一组 Nuxt Content 集合。默认语言使用基础名，其他语言加上语言代码后缀（",[41,460,461],{},"-"," 替换为 ",[41,464,465],{},"_","）：",[468,469,470,496],"table",{},[471,472,473],"thead",{},[474,475,476,480,483,493],"tr",{},[477,478,479],"th",{},"内容",[477,481,482],{},"默认语言",[477,484,485,486,488,489,492],{},"其他语言（以 ",[41,487,167],{},"、",[41,490,491],{},"zh-TW"," 为例）",[477,494,495],{},"来源",[497,498,499,526,549,569],"tbody",{},[474,500,501,505,510,518],{},[502,503,504],"td",{},"文档",[502,506,507],{},[41,508,509],{},"docs",[502,511,512,488,515],{},[41,513,514],{},"docs_en",[41,516,517],{},"docs_zh_TW",[502,519,520,488,523],{},[41,521,522],{},"content\u002Fdocs\u002F**",[41,524,525],{},"content\u002F{code}\u002Fdocs\u002F**",[474,527,528,531,536,541],{},[502,529,530],{},"首页",[502,532,533],{},[41,534,535],{},"landing",[502,537,538],{},[41,539,540],{},"landing_en",[502,542,543,488,546],{},[41,544,545],{},"content\u002Findex.md",[41,547,548],{},"content\u002F{code}\u002Findex.md",[474,550,551,554,559,564],{},[502,552,553],{},"版本发布",[502,555,556],{},[41,557,558],{},"releases",[502,560,561],{},[41,562,563],{},"releases_en",[502,565,566],{},[41,567,568],{},"content\u002Freleases.{md,yml}",[474,570,571,574,579,584],{},[502,572,573],{},"案例",[502,575,576],{},[41,577,578],{},"templates",[502,580,581],{},[41,582,583],{},"templates_en",[502,585,586],{},[41,587,588],{},"content\u002Ftemplates.{md,yml}",[10,590,591,592,594,595,597,598,600,601,488,604,607],{},"某种语言缺少 ",[41,593,558],{}," 或 ",[41,596,578],{}," 文件时，该语言下对应路由返回 404，其他语言不受影响。自定义页面查询内容时，用 ",[41,599,82],{}," 返回的 ",[41,602,603],{},"docsCollection",[41,605,606],{},"landingCollection"," 等取得当前语言的集合名。",[23,609,610],{"id":610},"语言的有效条件",[10,612,613,614,616],{},"构建时 Layer 会检查 ",[41,615,71],{}," 中的每一种语言，同时满足以下两项才会生效，否则跳过并在终端输出告警：",[618,619,620,632],"ol",{},[33,621,622,623,164,625,627,628,631],{},"该语言有翻译文件：Layer 内置了 ",[41,624,160],{},[41,626,167],{},"，其他语言由站点提供 ",[41,629,630],{},"i18n\u002Flocales\u002F{code}.json","；",[33,633,634,635,637,638,640],{},"存在内容目录 ",[41,636,444],{},"。默认语言的内容在 ",[41,639,440],{}," 根目录，不做此项检查。",[98,642,646],{"className":643,"code":644,"filename":645,"language":14,"meta":104},[449],"[movk-docs] 缺少内容目录 content\u002Fja\u002F，已跳过 locale \"ja\"\n","terminal",[41,647,644],{"__ignoreMap":104},[173,649,405],{"id":405},[10,651,652,653,655,656,659],{},"在站点根目录的 ",[41,654,400],{}," 中放置 ",[41,657,658],{},"{code}.json","，构建时会与 Layer 内置翻译合并，站点中的值优先：",[30,661,662,672],{},[33,663,664,667,668,671],{},[36,665,666],{},"新增语言","：如 ",[41,669,670],{},"i18n\u002Flocales\u002Fja.json","，只需翻译需要的键，缺失的键回退到英文内置文案；",[33,673,674,667,677,387,680,683],{},[36,675,676],{},"覆盖内置文案",[41,678,679],{},"i18n\u002Flocales\u002Fen.json",[41,681,682],{},"{ \"docs\": { \"tocTitle\": \"Contents\" } }","，其余键保持内置值。",[98,685,689],{"className":686,"code":687,"filename":670,"language":688,"meta":104,"style":104},"language-json shiki shiki-themes github-light github-light github-dark","{\n  \"docs\": {\n    \"tocTitle\": \"目次\",\n    \"copyPage\": \"ページをコピー\"\n  }\n}\n","json",[41,690,691,696,705,718,728,732],{"__ignoreMap":104},[108,692,693],{"class":110,"line":111},[108,694,695],{"class":125},"{\n",[108,697,698,702],{"class":110,"line":129},[108,699,701],{"class":700},"sBjJW","  \"docs\"",[108,703,704],{"class":125},": {\n",[108,706,707,710,713,716],{"class":110,"line":135},[108,708,709],{"class":700},"    \"tocTitle\"",[108,711,712],{"class":125},": ",[108,714,715],{"class":141},"\"目次\"",[108,717,326],{"class":125},[108,719,720,723,725],{"class":110,"line":145},[108,721,722],{"class":700},"    \"copyPage\"",[108,724,712],{"class":125},[108,726,727],{"class":141},"\"ページをコピー\"\n",[108,729,730],{"class":110,"line":151},[108,731,148],{"class":125},[108,733,734],{"class":110,"line":312},[108,735,736],{"class":125},"}\n",[10,738,739,740,746],{},"可用的键见 Layer 的 ",[77,741,745],{"href":742,"rel":743},"https:\u002F\u002Fgithub.com\u002Fmhaibaraai\u002Fmovk-nuxt-docs\u002Fblob\u002Fmain\u002Flayer\u002Fi18n\u002Flocales\u002Fen.json",[744],"nofollow","内置翻译文件","。修改站点翻译后需重启开发服务器。",[23,748,749],{"id":749},"界面文案",[10,751,752,753,758,759,761,762,488,765,488,768,771],{},"界面文案按 ",[36,754,755,757],{},[41,756,47],{}," 中的值 ?? 当前语言的内置翻译"," 解析。",[41,760,47],{}," 中的文案字段（如 ",[41,763,764],{},"toc.title",[41,766,767],{},"aside.filter.placeholder",[41,769,770],{},"aiChat.texts.*","）默认为空，由翻译提供；设置后在所有语言中都使用该值。",[10,773,774,775,164,778,781,782,96],{},"需要按语言区分的导航文案，在 ",[41,776,777],{},"header.nav",[41,779,780],{},"docs.categories"," 中写成以语言代码为键的对象，详见",[77,783,785],{"href":784},"\u002Fdocs\u002Fguide\u002Fnavigation","导航与分类",[98,787,789],{"className":100,"code":788,"filename":102,"language":103,"meta":104,"style":104},"export default defineAppConfig({\n  header: {\n    nav: [\n      { label: { 'zh-CN': '文档', 'en': 'Docs' }, to: '\u002Fdocs\u002Fgetting-started' }\n    ]\n  }\n})\n",[41,790,791,801,806,811,841,845,849],{"__ignoreMap":104},[108,792,793,795,797,799],{"class":110,"line":111},[108,794,115],{"class":114},[108,796,118],{"class":114},[108,798,122],{"class":121},[108,800,126],{"class":125},[108,802,803],{"class":110,"line":129},[108,804,805],{"class":125},"  header: {\n",[108,807,808],{"class":110,"line":135},[108,809,810],{"class":125},"    nav: [\n",[108,812,813,816,818,820,823,826,828,830,833,836,839],{"class":110,"line":145},[108,814,815],{"class":125},"      { label: { ",[108,817,323],{"class":141},[108,819,712],{"class":125},[108,821,822],{"class":141},"'文档'",[108,824,825],{"class":125},", ",[108,827,357],{"class":141},[108,829,712],{"class":125},[108,831,832],{"class":141},"'Docs'",[108,834,835],{"class":125}," }, to: ",[108,837,838],{"class":141},"'\u002Fdocs\u002Fgetting-started'",[108,840,365],{"class":125},[108,842,843],{"class":110,"line":151},[108,844,371],{"class":125},[108,846,847],{"class":110,"line":312},[108,848,148],{"class":125},[108,850,851],{"class":110,"line":317},[108,852,154],{"class":125},[10,854,855,856,859,860,863],{},"站内链接会自动加上当前语言前缀，",[41,857,858],{},"\u002Fdocs\u002Fgetting-started"," 在英文下指向 ",[41,861,862],{},"\u002Fen\u002Fdocs\u002Fgetting-started","。",[10,865,866,867,869,870,873,874,877],{},"在自己的组件中，启用 i18n 后 Layer 打开了 ",[41,868,43],{}," 的 typed messages，",[41,871,872],{},"useI18n().t"," 能补全内置与自定义的全部 key；",[41,875,876],{},"useMovkI18n().t"," 在两种模式下都可用，但 key 没有类型提示。",[23,879,880],{"id":880},"语言切换器",[10,882,883,884,887,888,892],{},"启用 i18n 且有两种以上有效语言时，页头右侧出现语言切换器（",[41,885,886],{},"LanguageSwitcher","），列出全部有效语言，切换后跳到当前页面在目标语言中的对应路径。它在",[77,889,891],{"href":890},"\u002Fdocs\u002Fguide\u002Fcustomization","覆盖契约","内，可以用同名组件替换。",[23,894,896],{"id":895},"多语言-seo","多语言 SEO",[10,898,899,900,903],{},"存在两种以上有效语言时，",[41,901,902],{},"useLocaleSeo()"," 在每个页面注入：",[30,905,906,916],{},[33,907,908,909,912,913,631],{},"每种语言的 ",[41,910,911],{},"\u003Clink rel=\"alternate\" hreflang=\"…\">","，以及指向第一种语言的 ",[41,914,915],{},"x-default",[33,917,918,919,922,923,431],{},"当前语言的 ",[41,920,921],{},"og:locale","（如 ",[41,924,925],{},"zh_CN",[10,927,928,164,931,934,935,938,939,942,943,863],{},[41,929,930],{},"\u003Chtml lang>",[41,932,933],{},"dir"," 由 ",[41,936,937],{},"@nuxt\u002Fui"," 的 locale 按当前语言设置。站点地图由 ",[41,940,941],{},"@nuxtjs\u002Fsitemap"," 按语言拆分，入口为 ",[41,944,945],{},"\u002Fsitemap_index.xml",[10,947,948,949,48,951,954,955,958],{},"首次访问时的浏览器语言重定向由 ",[41,950,43],{},[41,952,953],{},"detectBrowserLanguage"," 控制，需要固定首页语言时在 ",[41,956,957],{},"i18n"," 配置中关闭：",[98,960,962],{"className":100,"code":961,"filename":61,"language":103,"meta":104,"style":104},"export default defineNuxtConfig({\n  i18n: {\n    detectBrowserLanguage: false\n  }\n})\n",[41,963,964,974,978,986,990],{"__ignoreMap":104},[108,965,966,968,970,972],{"class":110,"line":111},[108,967,115],{"class":114},[108,969,118],{"class":114},[108,971,276],{"class":121},[108,973,126],{"class":125},[108,975,976],{"class":110,"line":129},[108,977,132],{"class":125},[108,979,980,983],{"class":110,"line":135},[108,981,982],{"class":125},"    detectBrowserLanguage: ",[108,984,985],{"class":700},"false\n",[108,987,988],{"class":110,"line":145},[108,989,148],{"class":125},[108,991,992],{"class":110,"line":151},[108,993,154],{"class":125},[23,995,997],{"id":996},"i18n-模板","i18n 模板",[10,999,1000,1001,1003,1004,1006],{},"需要直接开始一个中英双语站点时，使用 i18n 模板，它预置了 ",[41,1002,160],{},"（默认）与 ",[41,1005,167],{}," 两种语言、对应的内容目录和配置：",[98,1008,1010],{"className":190,"code":1009,"filename":645,"language":193,"meta":104,"style":104},"npx nuxi init -t gh:mhaibaraai\u002Fmovk-nuxt-docs\u002Ftemplates\u002Fi18n my-docs\n",[41,1011,1012],{"__ignoreMap":104},[108,1013,1014,1017,1020,1023,1026,1029],{"class":110,"line":111},[108,1015,1016],{"class":121},"npx",[108,1018,1019],{"class":141}," nuxi",[108,1021,1022],{"class":141}," init",[108,1024,1025],{"class":700}," -t",[108,1027,1028],{"class":141}," gh:mhaibaraai\u002Fmovk-nuxt-docs\u002Ftemplates\u002Fi18n",[108,1030,1031],{"class":141}," my-docs\n",[1033,1034,1035],"style",{},"html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":104,"searchDepth":129,"depth":129,"links":1037},[1038,1039,1040,1047,1048,1051,1052,1053,1054],{"id":25,"depth":129,"text":25},{"id":86,"depth":129,"text":86},{"id":171,"depth":129,"text":171,"children":1041},[1042,1044,1046],{"id":175,"depth":135,"text":1043},"安装 @nuxtjs\u002Fi18n",{"id":251,"depth":135,"text":1045},"配置 nuxt.config.ts",{"id":434,"depth":135,"text":434},{"id":455,"depth":129,"text":455},{"id":610,"depth":129,"text":610,"children":1049},[1050],{"id":405,"depth":135,"text":405},{"id":749,"depth":129,"text":749},{"id":880,"depth":129,"text":880},{"id":895,"depth":129,"text":896},{"id":996,"depth":129,"text":997},"customization",null,"md",false,{},{"icon":1061},"i-lucide-languages","\u002Fdocs\u002Fguide\u002Fi18n",{"title":18,"description":15},{"loc":1062},"docs\u002F2.guide\u002F7.i18n","W3XlblXGPvtdKIhvVR9bv61VyPGWHmiUHgQ-4D0TpMw",[1068],{"title":1069,"path":426,"stem":509,"children":1070,"page":1058},"Docs",[1071,1098,1164,1200,1241,1289],{"title":1072,"path":858,"stem":1073,"children":1074,"category":1056,"description":1056,"icon":1097},"开始","docs\u002F1.getting-started\u002F1.index",[1075,1079,1085,1091],{"title":1076,"path":858,"stem":1073,"category":1056,"description":1077,"icon":1078},"简介","可直接继承的 Nuxt Layer，集成排版、导航、搜索、SEO 和 AI，适合快速搭建文档站。","i-lucide-book-open",{"title":1080,"path":1081,"stem":1082,"category":1056,"description":1083,"icon":1084},"安装","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation","选用官方模板创建文档站，或将 Layer 接入现有 Nuxt 项目。","i-lucide-download",{"title":1086,"path":1087,"stem":1088,"category":1056,"description":1089,"icon":1090},"项目结构","\u002Fdocs\u002Fgetting-started\u002Fproject-structure","docs\u002F1.getting-started\u002F3.project-structure","了解文档内容放在哪里、页面如何生成，以及两份配置文件的分工。","i-lucide-folder-tree",{"title":1092,"path":1093,"stem":1094,"category":1056,"description":1095,"icon":1096},"从 v2 迁移","\u002Fdocs\u002Fgetting-started\u002Fmigration","docs\u002F1.getting-started\u002F4.migration","按 v2 与 v3 写法对照升级依赖、内容目录、配置和组件覆盖。","i-lucide-arrow-right-left","i-lucide-square-play",{"title":1099,"category":1056,"description":1056,"icon":1100,"path":1101,"stem":1102,"children":1103,"page":1058},"指南","i-lucide-compass","\u002Fdocs\u002Fguide","docs\u002F2.guide",[1104,1111,1118,1124,1130,1134,1140,1145,1151,1152,1158],{"title":1105,"path":1106,"stem":1107,"category":1108,"description":1109,"icon":1110},"配置总览","\u002Fdocs\u002Fguide\u002Fconfiguration","docs\u002F2.guide\u002F1.configuration","basics","用 nuxt.config.ts 配置构建功能，用 app.config.ts 调整界面、文案和导航。","i-lucide-settings",{"title":1112,"path":1113,"stem":1114,"category":1115,"description":1116,"icon":1117},"故障排查","\u002Fdocs\u002Fguide\u002Ftroubleshooting","docs\u002F2.guide\u002F10.troubleshooting","shipping","排查依赖缺失、文档 404、多语言和 AI Chat 等常见故障。","i-lucide-life-buoy",{"title":1119,"path":1120,"stem":1121,"category":1115,"description":1122,"icon":1123},"常见问题","\u002Fdocs\u002Fguide\u002Ffaq","docs\u002F2.guide\u002F11.faq","快速查阅运行环境、GitHub 集成、AI 模型、升级和静态部署的常见问题。","i-lucide-circle-help",{"title":1125,"path":1126,"stem":1127,"category":1108,"description":1128,"icon":1129},"主题与字体","\u002Fdocs\u002Fguide\u002Ftheme","docs\u002F2.guide\u002F2.theme","配置配色、标题字体与中文衬线字体，了解访客主题面板和动效偏好。","i-lucide-palette",{"title":785,"path":784,"stem":1131,"category":1108,"description":1132,"icon":1133},"docs\u002F2.guide\u002F3.navigation","配置页头、移动端菜单和侧栏分类，了解多语言链接、导航过滤和搜索。","i-lucide-map",{"title":1135,"path":1136,"stem":1137,"category":1108,"description":1138,"icon":1139},"功能开关","\u002Fdocs\u002Fguide\u002Ffeatures","docs\u002F2.guide\u002F4.features","查看可选功能的默认值、所需依赖和关闭后的行为。","i-lucide-toggle-right",{"title":1141,"path":890,"stem":1142,"category":1055,"description":1143,"icon":1144},"自定义","docs\u002F2.guide\u002F5.customization","用同名 Vue 组件覆盖页头、侧栏和页脚，查看可替换区域与示例。","i-lucide-paintbrush",{"title":1146,"path":1147,"stem":1148,"category":1055,"description":1149,"icon":1150},"页面与布局","\u002Fdocs\u002Fguide\u002Fpages","docs\u002F2.guide\u002F6.pages","从 content 生成首页、发布页和案例页，或在 app\u002Fpages 中自定义页面与布局。","i-lucide-layout-panel-top",{"title":18,"path":1062,"stem":1065,"category":1055,"description":15,"icon":1061},{"title":1153,"path":1154,"stem":1155,"category":1055,"description":1156,"icon":1157},"OG 图片","\u002Fdocs\u002Fguide\u002Fog-image","docs\u002F2.guide\u002F8.og-image","为文档生成社交分享图片，了解默认模板、中文字体和自定义方式。","i-lucide-image",{"title":1159,"path":1160,"stem":1161,"category":1115,"description":1162,"icon":1163},"部署","\u002Fdocs\u002Fguide\u002Fdeployment","docs\u002F2.guide\u002F9.deployment","将文档站部署到 Cloudflare、Vercel、Netlify 或 Node.js，或导出静态站点。","i-lucide-rocket",{"title":1165,"category":1056,"description":1056,"icon":1166,"path":1167,"stem":1168,"children":1169,"page":1058},"AI","i-lucide-sparkles","\u002Fdocs\u002Fai","docs\u002F3.ai",[1170,1176,1182,1188,1194],{"title":1171,"path":1172,"stem":1173,"category":1056,"description":1174,"icon":1175},"AI Chat","\u002Fdocs\u002Fai\u002Fai-chat","docs\u002F3.ai\u002F1.ai-chat","启用文档 AI 助手，配置模型、端点和其他服务商。","i-lucide-bot",{"title":1177,"path":1178,"stem":1179,"category":1056,"description":1180,"icon":1181},"MCP Server","\u002Fdocs\u002Fai\u002Fmcp","docs\u002F3.ai\u002F2.mcp","接入 \u002Fmcp 提供的文档工具、资源和提示词，了解如何配置或扩展服务。","i-lucide-plug",{"title":1183,"path":1184,"stem":1185,"category":1056,"description":1186,"icon":1187},"Agent Skills","\u002Fdocs\u002Fai\u002Fskills","docs\u002F3.ai\u002F3.skills","从 skills\u002F 目录发布 Agent Skills，让读者直接安装到支持的 AI 助手。","i-lucide-wand-sparkles",{"title":1189,"path":1190,"stem":1191,"category":1056,"description":1192,"icon":1193},"llms.txt","\u002Fdocs\u002Fai\u002Fllms-txt","docs\u002F3.ai\u002F4.llms-txt","配置 llms.txt 的目录分组，并用 llms-full.txt 提供文档全文。","i-lucide-file-text",{"title":1195,"path":1196,"stem":1197,"category":1056,"description":1198,"icon":1199},"代理发现","\u002Fdocs\u002Fai\u002Fagent-discovery","docs\u002F3.ai\u002F5.agent-discovery","通过 Markdown、站点地图和 \u002F.well-known 端点帮助 AI 代理发现和读取文档。","i-lucide-radar",{"title":1201,"category":1056,"description":1056,"icon":1202,"path":1203,"stem":1204,"children":1205,"page":1058},"写作","i-lucide-square-pilcrow","\u002Fdocs\u002Fwriting","docs\u002F4.writing",[1206,1212,1218,1224,1229,1235],{"title":1207,"path":1208,"stem":1209,"category":1056,"description":1210,"icon":1211},"Markdown 语法","\u002Fdocs\u002Fwriting\u002Fmarkdown-syntax","docs\u002F4.writing\u002F1.markdown-syntax","查看标题、链接、列表、表格和引用等 Markdown 语法的渲染示例。","i-lucide-heading",{"title":1213,"path":1214,"stem":1215,"category":1056,"description":1216,"icon":1217},"代码块","\u002Fdocs\u002Fwriting\u002Fcode-blocks","docs\u002F4.writing\u002F2.code-blocks","为代码添加文件名和行高亮，并组织多文件及多包管理器示例。","i-lucide-square-code",{"title":1219,"path":1220,"stem":1221,"category":1056,"description":1222,"icon":1223},"MDC 组件","\u002Fdocs\u002Fwriting\u002Fmdc-components","docs\u002F4.writing\u002F3.mdc-components","用 MDC 在 Markdown 中插入 Nuxt UI 的提示块、卡片、选项卡和其他组件。","i-lucide-puzzle",{"title":1225,"path":1226,"stem":1227,"category":1056,"description":1228,"icon":1157},"图片与视频","\u002Fdocs\u002Fwriting\u002Fmedia","docs\u002F4.writing\u002F4.media","在文档中插入图片和视频，配置亮暗色截图并编写替代文本。",{"title":1230,"path":1231,"stem":1232,"category":1056,"description":1233,"icon":1234},"Mermaid 图表","\u002Fdocs\u002Fwriting\u002Fmermaid","docs\u002F4.writing\u002F5.mermaid","启用 Mermaid，在 Markdown 中渲染适配亮暗主题的流程图、时序图和类图。","i-lucide-workflow",{"title":1236,"path":1237,"stem":1238,"category":1056,"description":1239,"icon":1240},"内容组件","\u002Fdocs\u002Fwriting\u002Fcontent-components","docs\u002F4.writing\u002F6.content-components","在 Markdown 中用内置内容组件添加动画、背景和落地页区块。","i-lucide-sparkle",{"title":1242,"category":1056,"description":1056,"icon":1243,"path":1244,"stem":1245,"children":1246,"page":1058},"组件","i-lucide-component","\u002Fdocs\u002Fcomponents","docs\u002F5.components",[1247,1253,1259,1265,1271,1277,1283],{"title":1248,"path":1249,"stem":1250,"category":1056,"description":1251,"icon":1252},"ComponentProps","\u002Fdocs\u002Fcomponents\u002Fcomponent-props","docs\u002F5.components\u002F1.component-props","用 `:component-props` 从组件元数据生成 Props 表格，展示类型、默认值和说明。","i-lucide-list",{"title":1254,"path":1255,"stem":1256,"category":1056,"description":1257,"icon":1258},"ComponentSlots","\u002Fdocs\u002Fcomponents\u002Fcomponent-slots","docs\u002F5.components\u002F2.component-slots","用 `:component-slots` 根据 `defineSlots` 展示插槽名称、参数类型和说明。","i-lucide-layout-panel-left",{"title":1260,"path":1261,"stem":1262,"category":1056,"description":1263,"icon":1264},"ComponentEmits","\u002Fdocs\u002Fcomponents\u002Fcomponent-emits","docs\u002F5.components\u002F3.component-emits","用 `:component-emits` 根据 `defineEmits` 展示事件名称、参数和说明。","i-lucide-radio-tower",{"title":1266,"path":1267,"stem":1268,"category":1056,"description":1269,"icon":1270},"ComponentExample","\u002Fdocs\u002Fcomponents\u002Fcomponent-example","docs\u002F5.components\u002F4.component-example","用 `:component-example` 在文档中展示 Vue 示例的实时预览和高亮源码。","i-lucide-app-window",{"title":1272,"path":1273,"stem":1274,"category":1056,"description":1275,"icon":1276},"ComponentCode","\u002Fdocs\u002Fcomponents\u002Fcomponent-code","docs\u002F5.components\u002F5.component-code","用 `::component-code` 调整组件属性，并同步更新可复制的 Vue 示例。","i-lucide-sliders-horizontal",{"title":1278,"path":1279,"stem":1280,"category":1056,"description":1281,"icon":1282},"CommitChangelog","\u002Fdocs\u002Fcomponents\u002Fcommit-changelog","docs\u002F5.components\u002F6.commit-changelog","用 `:commit-changelog` 展示组件或文件的 GitHub 提交记录，并按版本分组。","i-lucide-git-commit-horizontal",{"title":1284,"path":1285,"stem":1286,"category":1056,"description":1287,"icon":1288},"PageLastCommit","\u002Fdocs\u002Fcomponents\u002Fpage-last-commit","docs\u002F5.components\u002F7.page-last-commit","在文档页显示 Markdown 文件最后一次提交的时间、作者与说明。","i-lucide-history",{"title":1290,"category":1056,"description":1056,"icon":1291,"path":1292,"stem":1293,"children":1294,"page":1058},"参考","i-lucide-book-marked","\u002Fdocs\u002Freference","docs\u002F6.reference",[1295,1301,1307,1381],{"title":1296,"path":1297,"stem":1298,"category":1056,"description":1299,"icon":1300},"app.config 参考","\u002Fdocs\u002Freference\u002Fapp-config","docs\u002F6.reference\u002F1.app-config","查看 app.config.ts 的全部字段、类型和默认值，以及对应的使用指南。","i-lucide-file-cog",{"title":1302,"path":1303,"stem":1304,"category":1056,"description":1305,"icon":1306},"nuxt.config 选项","\u002Fdocs\u002Freference\u002Fnuxt-config","docs\u002F6.reference\u002F2.nuxt-config","查阅 Layer 在构建时使用的 nuxt.config 选项和环境变量。","i-lucide-settings-2",{"title":1308,"category":1056,"description":1056,"icon":1309,"path":1310,"stem":1311,"children":1312,"page":1058},"组合式函数","i-lucide-square-function","\u002Fdocs\u002Freference\u002Fcomposables","docs\u002F6.reference\u002F3.composables",[1313,1317,1323,1329,1335,1341,1347,1353,1359,1364,1370,1376],{"title":1314,"path":79,"stem":1315,"category":1056,"description":1316,"icon":1061},"useMovkI18n","docs\u002F6.reference\u002F3.composables\u002F1.use-movk-i18n","读取当前语言、翻译文案，生成本地化链接并查找对应的内容集合。",{"title":1318,"path":1319,"stem":1320,"category":1056,"description":1321,"icon":1322},"useLocaleSeo","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-locale-seo","docs\u002F6.reference\u002F3.composables\u002F10.use-locale-seo","为多语言页面生成 hreflang、x-default 和 og:locale。","i-lucide-globe",{"title":1324,"path":1325,"stem":1326,"category":1056,"description":1327,"icon":1328},"useFetchComponentMeta","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-fetch-component-meta","docs\u002F6.reference\u002F3.composables\u002F11.use-fetch-component-meta","启用组件文档后，读取 Props、Slots 和 Events 的类型与说明。","i-lucide-braces",{"title":1330,"path":1331,"stem":1332,"category":1056,"description":1333,"icon":1334},"useFetchComponentExample","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-fetch-component-example","docs\u002F6.reference\u002F3.composables\u002F12.use-fetch-component-example","启用组件文档后，读取 Vue 示例的源码、路径和组件名。","i-lucide-file-code",{"title":1336,"path":1337,"stem":1338,"category":1056,"description":1339,"icon":1340},"useDocsNavigation","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-docs-navigation","docs\u002F6.reference\u002F3.composables\u002F2.use-docs-navigation","复用站点外壳已加载的文档导航树，供自定义导航组件使用。","i-lucide-list-tree",{"title":1342,"path":1343,"stem":1344,"category":1056,"description":1345,"icon":1346},"useNavigation","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-navigation","docs\u002F6.reference\u002F3.composables\u002F3.use-navigation","从文档导航树提取栏目、生成侧栏分组和面包屑。","i-lucide-panel-left",{"title":1348,"path":1349,"stem":1350,"category":1056,"description":1351,"icon":1352},"useHeader","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-header","docs\u002F6.reference\u002F3.composables\u002F4.use-header","读取页头的桌面端与移动端链接，需要动态导航时可覆盖此函数。","i-lucide-panel-top",{"title":1354,"path":1355,"stem":1356,"category":1056,"description":1357,"icon":1358},"useCategory","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-category","docs\u002F6.reference\u002F3.composables\u002F5.use-category","读取侧栏分类定义，按配置为栏目内的页面分组和排序。","i-lucide-folders",{"title":1360,"path":1361,"stem":1362,"category":1056,"description":1363,"icon":1129},"useTheme","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-theme","docs\u002F6.reference\u002F3.composables\u002F6.use-theme","管理颜色、圆角、图标和颜色模式，保存访客偏好并导出主题配置。",{"title":1365,"path":1366,"stem":1367,"category":1056,"description":1368,"icon":1369},"useDocsRoute","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-docs-route","docs\u002F6.reference\u002F3.composables\u002F7.use-docs-route","判断当前路由是否为文档子页，兼容默认路径和带语言前缀的路径。","i-lucide-route",{"title":1371,"path":1372,"stem":1373,"category":1056,"description":1374,"icon":1375},"useDocsFilterConfig","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-docs-filter-config","docs\u002F6.reference\u002F3.composables\u002F8.use-docs-filter-config","读取侧栏过滤设置、判断是否显示过滤框，并复用默认过滤逻辑。","i-lucide-list-filter",{"title":1377,"path":1378,"stem":1379,"category":1056,"description":1380,"icon":1270},"useDocsShell","\u002Fdocs\u002Freference\u002Fcomposables\u002Fuse-docs-shell","docs\u002F6.reference\u002F3.composables\u002F9.use-docs-shell","为页面外壳加载当前语言的导航与搜索索引，并设置页面语言与方向。",{"title":1382,"path":1383,"stem":1384,"category":1056,"description":1385,"icon":1386},"A–Z 索引","\u002Fdocs\u002Freference\u002Fa-z","docs\u002F6.reference\u002F9.a-z","按英文标题的首字母查找文档，中文页面同时展示英文标题。","i-lucide-list-ordered",{"data":1388,"body":1389},{},{"type":6,"children":1390},[1391],{"type":9,"tag":10,"props":1392,"children":1393},{},[1394],{"type":14,"value":1395},"Copyright © 2024 - 2026",[1397,1398],{"title":1146,"path":1147,"stem":1148,"description":1149,"icon":1150,"children":-1},{"title":1153,"path":1154,"stem":1155,"description":1156,"icon":1157,"children":-1},1796367090078,"2ce86a3d-28e5-414a-a0bc-737c9421d4b3"]