[{"data":1,"prerenderedAt":284},["ShallowReactive",2],{"docs:page:\u002Fvi\u002Fdocs\u002Fguides\u002Fbuilding-a-public-page":3,"docs:navigation:vi":187,"docs:section-descriptions:\u002Fvi\u002Fdocs\u002Fguides\u002Fbuilding-a-public-page":278,"docs:translations:\u002Fvi\u002Fdocs\u002Fguides\u002Fbuilding-a-public-page":279,"docs:surroundings:\u002Fvi\u002Fdocs\u002Fguides\u002Fbuilding-a-public-page":281},{"id":4,"title":5,"body":6,"description":179,"extension":180,"meta":181,"navigation":182,"path":183,"seo":184,"stem":185,"__hash__":186},"docs\u002Fvi\u002Fdocs\u002F3.guides\u002Fbuilding-a-public-page.md","Xây dựng một trang công khai",{"type":7,"value":8,"toc":171},"minimark",[9,13,17,28,33,36,39,47,50,108,111,119,129,135,138,142,153,156,167],[10,11,5],"h1",{"id":12},"xây-dựng-một-trang-công-khai",[14,15,16],"p",{},"Một trang công khai trên Ecoma là sự kết hợp của 4 tầng:",[18,19,25],"pre",{"className":20,"code":22,"language":23,"meta":24},[21],"language-text","app\u002Flayout      →  PublicShell, global navigation, mount topology\n        ↓\napp\u002Fi18n        →  locale dimension: registry, parse, switch\n        ↓\ncontent         →  markdown được bản địa hoá, render từ content tree\n","text","",[26,27,22],"code",{"__ignoreMap":24},[29,30,32],"h2",{"id":31},"_1-ứng-dụng-sở-hữu-routing-và-content","1. Ứng dụng sở hữu routing và content",[14,34,35],{},"Ứng dụng docs định nghĩa một file-based route cho toàn bộ nội dung tài liệu.\nRoute validate pathname theo contract topology chung, rồi resolve document từ\ncontent collection.",[14,37,38],{},"Nếu topology không hợp lệ, route bị từ chối trước khi lookup content; nếu content\nkhông tồn tại, trang trả về 404.",[29,40,42,43,46],{"id":41},"_2-applayout-cung-cấp-shell","2. ",[26,44,45],{},"app\u002Flayout"," cung cấp shell",[14,48,49],{},"Mọi trang docs đều render shell chung thay vì header\u002Ffooter riêng:",[18,51,55],{"className":52,"code":53,"language":54,"meta":24,"style":24},"language-vue shiki shiki-themes github-light github-dark","\u003CPublicShell :path=\"route.path\">\n  \u003C!-- nội dung docs -->\n\u003C\u002FPublicShell>\n","vue",[26,56,57,92,98],{"__ignoreMap":24},[58,59,62,66,70,73,77,80,84,87,89],"span",{"class":60,"line":61},"line",1,[58,63,65],{"class":64},"sVt8B","\u003C",[58,67,69],{"class":68},"s9eBZ","PublicShell",[58,71,72],{"class":64}," :",[58,74,76],{"class":75},"sScJk","path",[58,78,79],{"class":64},"=",[58,81,83],{"class":82},"sZZnC","\"",[58,85,86],{"class":64},"route.path",[58,88,83],{"class":82},[58,90,91],{"class":64},">\n",[58,93,95],{"class":60,"line":94},2,[58,96,97],{"class":64},"  \u003C!-- nội dung docs -->\n",[58,99,101,104,106],{"class":60,"line":100},3,[58,102,103],{"class":64},"\u003C\u002F",[58,105,69],{"class":68},[58,107,91],{"class":64},[14,109,110],{},"Shell parse pathname một lần, render header (brand, global navigation, bộ\nchuyển ngôn ngữ) và footer — không cần tái hiện lại trên mỗi app.",[29,112,114,115,118],{"id":113},"_3-appi18n-sở-hữu-locale","3. ",[26,116,117],{},"app\u002Fi18n"," sở hữu locale",[14,120,121,122,124,125,128],{},"Locale, metadata của locale, và việc chuyển đổi giữa các locale đều đến từ\n",[26,123,117],{},". Khi chuyển ngôn ngữ trên trang docs, shell gọi ",[26,126,127],{},"switchLocale()","\nđể giữ nguyên document và chỉ đổi segment locale:",[18,130,133],{"className":131,"code":132,"language":23,"meta":24},[21],"\u002Fen\u002Fdocs\u002Fconcepts\u002Fpublic-web\n        ↓\n\u002Fvi\u002Fdocs\u002Fconcepts\u002Fpublic-web\n",[26,134,132],{"__ignoreMap":24},[14,136,137],{},"Ứng dụng docs không tự implement locale parsing hay path rewriting.",[29,139,141],{"id":140},"_4-content-render-tại-app","4. Content render tại app",[14,143,144,145,148,149,152],{},"Trang query collection ",[26,146,147],{},"docs"," bằng pathname chính xác và render document bằng\n",[26,150,151],{},"ContentRenderer"," — typography bạn thấy (heading, code block, table,\nblockquote) là rendering riêng của app, không phải dịch vụ render chung.",[154,155],"hr",{},[14,157,158],{},[159,160,161,162],"em",{},"Trước: ",[163,164,166],"a",{"href":165},"\u002Fvi\u002Fdocs\u002Fguides\u002Flocal-development","Phát triển cục bộ",[168,169,170],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}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);}",{"title":24,"searchDepth":94,"depth":94,"links":172},[173,174,176,178],{"id":31,"depth":94,"text":32},{"id":41,"depth":94,"text":175},"2. app\u002Flayout cung cấp shell",{"id":113,"depth":94,"text":177},"3. app\u002Fi18n sở hữu locale",{"id":140,"depth":94,"text":141},"Cách một trang công khai kết hợp các module của app với content.","md",{},true,"\u002Fvi\u002Fdocs\u002Fguides\u002Fbuilding-a-public-page",{"title":5,"description":179},"vi\u002Fdocs\u002F3.guides\u002Fbuilding-a-public-page","GAkl2kyAaztZFA_flNb20bCaKK3Gc-z141-aC_3bqkU",[188],{"title":189,"path":190,"stem":191,"children":192,"page":234},"Vi","\u002Fvi","vi",[193,235],{"title":194,"path":195,"stem":196,"children":197,"page":234},"Blog","\u002Fvi\u002Fblog","vi\u002Fblog",[198,204,210,216,222,228],{"title":199,"path":200,"stem":201,"children":202},"Một mô hình URL cho mọi trang public","\u002Fvi\u002Fblog\u002Furl-model","vi\u002Fblog\u002F1.url-model\u002Findex",[203],{"title":199,"path":200,"stem":201},{"title":205,"path":206,"stem":207,"children":208},"Content được resolve ở build time","\u002Fvi\u002Fblog\u002Fbuild-time-content","vi\u002Fblog\u002F2.build-time-content\u002Findex",[209],{"title":205,"path":206,"stem":207},{"title":211,"path":212,"stem":213,"children":214},"Locale switching không bao giờ nói dối","\u002Fvi\u002Fblog\u002Flocale-switching","vi\u002Fblog\u002F3.locale-switching\u002Findex",[215],{"title":211,"path":212,"stem":213},{"title":217,"path":218,"stem":219,"children":220},"Deploy một blog như static assets","\u002Fvi\u002Fblog\u002Fstatic-deployment","vi\u002Fblog\u002F4.static-deployment\u002Findex",[221],{"title":217,"path":218,"stem":219},{"title":223,"path":224,"stem":225,"children":226},"Trang đọc bài không phải trang tài liệu","\u002Fvi\u002Fblog\u002Freading-first-design","vi\u002Fblog\u002F5.reading-first-design\u002Findex",[227],{"title":223,"path":224,"stem":225},{"title":229,"path":230,"stem":231,"children":232},"Blog này là gì (và không phải gì)","\u002Fvi\u002Fblog\u002Fdemo-content-note","vi\u002Fblog\u002F6.demo-content-note\u002Findex",[233],{"title":229,"path":230,"stem":231},false,{"title":236,"path":237,"stem":238,"children":239},"Tổng quan","\u002Fvi\u002Fdocs","vi\u002Fdocs\u002Findex",[240,241,255,269],{"title":236,"path":237,"stem":238},{"title":242,"path":243,"stem":244,"children":245},"Bắt đầu","\u002Fvi\u002Fdocs\u002Fgetting-started","vi\u002Fdocs\u002F1.getting-started\u002Findex",[246,247,251],{"title":242,"path":243,"stem":244},{"title":248,"path":249,"stem":250},"Các bước đầu tiên","\u002Fvi\u002Fdocs\u002Fgetting-started\u002Ffirst-steps","vi\u002Fdocs\u002F1.getting-started\u002Ffirst-steps",{"title":252,"path":253,"stem":254},"Cài đặt","\u002Fvi\u002Fdocs\u002Fgetting-started\u002Finstallation","vi\u002Fdocs\u002F1.getting-started\u002Finstallation",{"title":256,"path":257,"stem":258,"children":259},"Khái niệm","\u002Fvi\u002Fdocs\u002Fconcepts","vi\u002Fdocs\u002F2.concepts\u002Findex",[260,261,265],{"title":256,"path":257,"stem":258},{"title":262,"path":263,"stem":264},"Nội dung và ngôn ngữ","\u002Fvi\u002Fdocs\u002Fconcepts\u002Fcontent-and-locales","vi\u002Fdocs\u002F2.concepts\u002Fcontent-and-locales",{"title":266,"path":267,"stem":268},"Web công khai","\u002Fvi\u002Fdocs\u002Fconcepts\u002Fpublic-web","vi\u002Fdocs\u002F2.concepts\u002Fpublic-web",{"title":270,"path":271,"stem":272,"children":273},"Hướng dẫn","\u002Fvi\u002Fdocs\u002Fguides","vi\u002Fdocs\u002F3.guides\u002Findex",[274,275,276],{"title":270,"path":271,"stem":272},{"title":5,"path":183,"stem":185},{"title":166,"path":165,"stem":277},"vi\u002Fdocs\u002F3.guides\u002Flocal-development",{},[280,191],"en",[282,283],{"title":270,"path":271,"stem":272,"children":-1},{"title":166,"path":165,"stem":277,"children":-1},1791809694094]