"use strict";(self.webpackChunkdoc=self.webpackChunkdoc||[]).push([[863],{7328:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>a,contentTitle:()=>n,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=t(4848),o=t(8453);const i={sidebar_position:5},n="Deploy your site",l={id:"tutorial-basics/deploy-your-site",title:"Deploy your site",description:"Docusaurus is a static-site-generator (also called Jamstack).",source:"@site/docs/tutorial-basics/deploy-your-site.md",sourceDirName:"tutorial-basics",slug:"/tutorial-basics/deploy-your-site",permalink:"/docs/tutorial-basics/deploy-your-site",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/tutorial-basics/deploy-your-site.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Markdown Features",permalink:"/docs/tutorial-basics/markdown-features"},next:{title:"Congratulations!",permalink:"/docs/tutorial-basics/congratulations"}},a={},c=[{value:"Build your site",id:"build-your-site",level:2},{value:"Deploy your site",id:"deploy-your-site-1",level:2}];function d(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{id:"deploy-your-site",children:"Deploy your site"}),"\n",(0,r.jsxs)(s.p,{children:["Docusaurus is a ",(0,r.jsx)(s.strong,{children:"static-site-generator"})," (also called ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.a,{href:"https://jamstack.org/",children:"Jamstack"})}),")."]}),"\n",(0,r.jsxs)(s.p,{children:["It builds your site as simple ",(0,r.jsx)(s.strong,{children:"static HTML, JavaScript and CSS files"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"build-your-site",children:"Build your site"}),"\n",(0,r.jsxs)(s.p,{children:["Build your site ",(0,r.jsx)(s.strong,{children:"for production"}),":"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"npm run build\n"})}),"\n",(0,r.jsxs)(s.p,{children:["The static files are generated in the ",(0,r.jsx)(s.code,{children:"build"})," folder."]}),"\n",(0,r.jsx)(s.h2,{id:"deploy-your-site-1",children:"Deploy your site"}),"\n",(0,r.jsx)(s.p,{children:"Test your production build locally:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"npm run serve\n"})}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"build"})," folder is now served at ",(0,r.jsx)(s.a,{href:"http://localhost:3000/",children:"http://localhost:3000/"}),"."]}),"\n",(0,r.jsxs)(s.p,{children:["You can now deploy the ",(0,r.jsx)(s.code,{children:"build"})," folder ",(0,r.jsx)(s.strong,{children:"almost anywhere"})," easily, ",(0,r.jsx)(s.strong,{children:"for free"})," or very small cost (read the ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.a,{href:"https://docusaurus.io/docs/deployment",children:"Deployment Guide"})}),")."]})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,s,t)=>{t.d(s,{R:()=>n,x:()=>l});var r=t(6540);const o={},i=r.createContext(o);function n(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:n(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]);