[{"data":1,"prerenderedAt":507},["ShallowReactive",2],{"footer-links":3,"content-\u002Fdeploy":12},[4,9],{"path":5,"title":6,"type":7,"isExternal":8},"https:\u002F\u002Fgithub.com\u002Flife-and-dev\u002Fmdsite","GitHub Repo","link",true,{"path":10,"title":11,"type":7,"isExternal":8},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@life-and-dev\u002Fmdsite","NPM Registry",{"id":13,"title":14,"body":15,"description":139,"extension":501,"meta":502,"navigation":8,"path":503,"seo":504,"stem":505,"__hash__":506},"content\u002Fdeploy.md","Deployment Guide",{"type":16,"value":17,"toc":480},"minimark",[18,22,27,31,66,74,124,128,133,154,160,164,176,194,212,216,220,223,238,245,249,255,294,309,319,322,330,334,338,343,347,407,420,424,431,434,446,451,455,463,467,476],[19,20,14],"h1",{"id":21},"deployment-guide",[23,24,26],"h2",{"id":25},"prerequisites","Prerequisites",[28,29,30],"p",{},"You need:",[32,33,34,53,60,63],"ol",{},[35,36,37,38,42,43,46,47,52],"li",{},"The ",[39,40,41],"code",{},"mdsite"," CLI installed via ",[39,44,45],{},"npm install -g @life-and-dev\u002Fmdsite"," (or from ",[48,49,51],"a",{"href":50},"develop","local development project",").",[35,54,55,56,59],{},"A content directory with ",[39,57,58],{},"mdsite.yml",".",[35,61,62],{},"A GitHub repository for GitHub Pages or Cloudflare Pages.",[35,64,65],{},"A Cloudflare account if you deploy with Cloudflare Pages.",[28,67,68,69,71,72,59],{},"Run all ",[39,70,41],{}," commands from the content directory that contains ",[39,73,58],{},[75,76,78,96],"markdown-alert",{"type":77},"note",[28,79,80,81,84,85,87,88,91,92,95],{},"Pay attention to ",[39,82,83],{},"paths.output"," in ",[39,86,58],{}," which indicates where generated static pages will be written to. The default value is ",[39,89,90],{},".output",", so the static site is generated in ",[39,93,94],{},".output\u002Fpublic"," by default.",[28,97,98,99,109,110,113,114,117,118,123],{},"This mirrors ",[48,100,104,105,108],{"href":101,"rel":102},"https:\u002F\u002Fnuxt.com\u002Fdocs\u002F4.x\u002Fgetting-started\u002Fdeployment#static-hosting",[103],"nofollow","Nuxt's standard ",[39,106,107],{},".output\u002F"," layout",", where ",[39,111,112],{},"public\u002F"," is the served web root and ",[39,115,116],{},"server\u002F"," holds an optional Node runtime (",[48,119,122],{"href":120,"rel":121},"https:\u002F\u002Fnitro.build\u002Fconfig#output",[103],"Nitro output config","). Keeping the conventional layout means a future server-side or hybrid mode could be added without breaking deploy configurations.",[23,125,127],{"id":126},"preview-locally","Preview Locally",[129,130,132],"h3",{"id":131},"️-generate-the-static-site","🏗️ Generate the static site",[134,135,140],"pre",{"className":136,"code":137,"language":138,"meta":139,"style":139},"language-bash shiki shiki-themes github-light github-dark","mdsite generate\n","bash","",[39,141,142],{"__ignoreMap":139},[143,144,147,150],"span",{"class":145,"line":146},"line",1,[143,148,41],{"class":149},"sScJk",[143,151,153],{"class":152},"sZZnC"," generate\n",[28,155,156,159],{},[39,157,158],{},"mdsite generate"," builds the static site.",[129,161,163],{"id":162},"preview-the-generated-site","🔎 Preview the generated site",[134,165,167],{"className":136,"code":166,"language":138,"meta":139,"style":139},"mdsite static\n",[39,168,169],{"__ignoreMap":139},[143,170,171,173],{"class":145,"line":146},[143,172,41],{"class":149},[143,174,175],{"class":152}," static\n",[28,177,178,179,182,183,185,186,189,190,193],{},"Use ",[39,180,181],{},"mdsite static"," after ",[39,184,158],{}," to check the generated static site locally before deploying. The foreground preview stops when you interrupt the command or close the terminal. Use ",[39,187,188],{},"mdsite static -d"," for a tracked background preview, and ",[39,191,192],{},"mdsite stop"," to stop tracked detached previews.",[75,195,196,209],{"type":77},[28,197,198,200,201,204,205,208],{},[39,199,158],{}," writes a ",[39,202,203],{},".nvmrc"," containing ",[39,206,207],{},"24"," that should also be Git committed.",[28,210,211],{},"Some Nuxt dependencies requires Node.js 24 while some builders defaults to older Node versions.",[23,213,215],{"id":214},"github-pages","GitHub Pages",[129,217,219],{"id":218},"️-generate-the-workflow","⚙️ Generate the workflow",[28,221,222],{},"From the content directory, run:",[134,224,226],{"className":136,"code":225,"language":138,"meta":139,"style":139},"mdsite prepare github\n",[39,227,228],{"__ignoreMap":139},[143,229,230,232,235],{"class":145,"line":146},[143,231,41],{"class":149},[143,233,234],{"class":152}," prepare",[143,236,237],{"class":152}," github\n",[28,239,240,241,244],{},"This creates ",[39,242,243],{},".github\u002Fworkflows\u002Fdeploy.yml"," in the current content directory.",[129,246,248],{"id":247},"deploy-with-github-actions","🚀 Deploy with GitHub Actions",[28,250,251,252,254],{},"Commit ",[39,253,58],{},", your content files, and the generated workflow:",[134,256,258],{"className":136,"code":257,"language":138,"meta":139,"style":139},"git add .\ngit commit -m \"Add GitHub Pages deployment\"\ngit push\n",[39,259,260,271,286],{"__ignoreMap":139},[143,261,262,265,268],{"class":145,"line":146},[143,263,264],{"class":149},"git",[143,266,267],{"class":152}," add",[143,269,270],{"class":152}," .\n",[143,272,274,276,279,283],{"class":145,"line":273},2,[143,275,264],{"class":149},[143,277,278],{"class":152}," commit",[143,280,282],{"class":281},"sj4cs"," -m",[143,284,285],{"class":152}," \"Add GitHub Pages deployment\"\n",[143,287,289,291],{"class":145,"line":288},3,[143,290,264],{"class":149},[143,292,293],{"class":152}," push\n",[28,295,296,297,301,302,305,306,308],{},"In GitHub, set ",[298,299,300],"strong",{},"Settings > Pages > Build and deployment > Source"," to ",[298,303,304],{},"GitHub Actions",". Do not \"Configure\" any build-in GitHub Action template. Instead the committed ",[39,307,243],{}," will take care of the GitHub Pages deployment.",[28,310,311,312,315,316,59],{},"The generated workflow builds on pushes to ",[39,313,314],{},"main"," and publishes the static site from ",[39,317,318],{},"\u003Cpaths.output>\u002Fpublic",[28,320,321],{},"After the workflow finishes, preview the site online at:",[134,323,328],{"className":324,"code":326,"language":327,"meta":139},[325],"language-text","https:\u002F\u002F\u003Cgithub-username>.github.io\u002F\u003Crepository-name>\u002F\n","text",[39,329,326],{"__ignoreMap":139},[23,331,333],{"id":332},"cloudflare-pages","Cloudflare Pages",[129,335,337],{"id":336},"️-create-a-pages-project","☁️ Create a Pages project",[28,339,340,341,59],{},"In Cloudflare Pages, connect the repository that contains your mdsite content and ",[39,342,58],{},[129,344,346],{"id":345},"️-build-configuration","⚙️ Build Configuration",[348,349,350,364],"table",{},[351,352,353],"thead",{},[354,355,356,361],"tr",{},[357,358,360],"th",{"align":359},"left","Setting",[357,362,363],{"align":359},"Value",[365,366,367,376,386,395],"tbody",{},[354,368,369,373],{},[370,371,372],"td",{"align":359},"Framework preset",[370,374,375],{"align":359},"None",[354,377,378,381],{},[370,379,380],{"align":359},"Build command",[370,382,383],{"align":359},[39,384,385],{},"npx @life-and-dev\u002Fmdsite@latest generate",[354,387,388,391],{},[370,389,390],{"align":359},"Build output directory",[370,392,393],{"align":359},[39,394,94],{},[354,396,397,400],{},[370,398,399],{"align":359},"Root directory",[370,401,402,403,406],{"align":359},"Your content directory, or ",[39,404,405],{},"\u002F"," if the repository root is the content directory",[28,408,409,410,412,413,415,416,301,418,59],{},"If ",[39,411,58],{}," sets a different ",[39,414,83],{},", set the ",[298,417,390],{},[39,419,318],{},[23,421,423],{"id":422},"troubleshooting","Troubleshooting",[129,425,427,428,430],{"id":426},"️-mdsiteyml-is-missing","⚠️ ",[39,429,58],{}," is missing",[28,432,433],{},"In the content directory, run:",[134,435,437],{"className":136,"code":436,"language":138,"meta":139,"style":139},"mdsite init\n",[39,438,439],{"__ignoreMap":139},[143,440,441,443],{"class":145,"line":146},[143,442,41],{"class":149},[143,444,445],{"class":152}," init\n",[28,447,448,449],{},"Then configure the generated ",[39,450,58],{},[129,452,454],{"id":453},"️-deployed-site-is-empty-or-404s","⚠️ Deployed site is empty or 404s",[28,456,457,458,460,461,59],{},"Check that the host publishes ",[39,459,318],{},". With the default config, this is ",[39,462,94],{},[129,464,466],{"id":465},"️-github-workflow-generation-fails","⚠️ GitHub workflow generation fails",[28,468,469,472,473,475],{},[39,470,471],{},"mdsite prepare github"," requires a valid ",[39,474,58],{}," and the configured local renderer path to exist when the workflow is generated.",[477,478,479],"style",{},"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);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":139,"searchDepth":273,"depth":273,"links":481},[482,483,487,491,495],{"id":25,"depth":273,"text":26},{"id":126,"depth":273,"text":127,"children":484},[485,486],{"id":131,"depth":288,"text":132},{"id":162,"depth":288,"text":163},{"id":214,"depth":273,"text":215,"children":488},[489,490],{"id":218,"depth":288,"text":219},{"id":247,"depth":288,"text":248},{"id":332,"depth":273,"text":333,"children":492},[493,494],{"id":336,"depth":288,"text":337},{"id":345,"depth":288,"text":346},{"id":422,"depth":273,"text":423,"children":496},[497,499,500],{"id":426,"depth":288,"text":498},"⚠️ mdsite.yml is missing",{"id":453,"depth":288,"text":454},{"id":465,"depth":288,"text":466},"md",{},"\u002Fdeploy",{"title":14,"description":139},"deploy","L3sA34fyHcCARPyuTRQY_HnE8DVgbGuhde1I15uGr2g",1784017753076]