<html><head><title>Hosting</title><metacharSet="utf-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><metaproperty="og:title"content="Hosting"/><metaproperty="og:description"content="Quartz effectively turns your Markdown files and other resources into a bundle of HTML, JS, and CSS files (a website!). However, if you’d like to publish your site to the world, you need a way to host it online."/><metaproperty="og:image"content="https://roadmap.logos.co/static/og-image.png"/><metaproperty="og:width"content="1200"/><metaproperty="og:height"content="675"/><linkrel="icon"href="./static/icon.png"/><metaname="description"content="Quartz effectively turns your Markdown files and other resources into a bundle of HTML, JS, and CSS files (a website!). However, if you’d like to publish your site to the world, you need a way to host it online."/><metaname="generator"content="Logos Roadmaps"/><linkrel="preconnect"href="https://fonts.googleapis.com"/><linkrel="preconnect"href="https://fonts.gstatic.com"/><linkhref="./index.css"rel="stylesheet"type="text/css"spa-preserve/><linkhref="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css"rel="stylesheet"type="text/css"spa-preserve/><linkhref="https://fonts.googleapis.com/css2?family=IBM Plex Mono&family=Schibsted Grotesk:wght@400;700&family=Source Sans Pro:ital,wght@0,400;0,600;1,400;1,600&display=swap"rel="stylesheet"type="text/css"spa-preserve/><scriptsrc="./prescript.js"type="application/javascript"spa-preserve></script><scripttype="application/javascript"spa-preserve>constfetchData=fetch(`./static/contentIndex.json`).then(data=>data.json())</script></head><bodydata-slug="hosting"><divid="quartz-root"class="page"><divid="quartz-body"><divclass="left sidebar"><h1class="page-title"><ahref=".">Logos Collective Project Roadmaps</a></h1><divclass="spacer mobile-only"></div><divclass="search"><divid="search-icon"><p>Search</p><div></div><svgtabIndex="0"aria-labelledby="title desc"role="img"xmlns="http://www.w3.org/2000/svg"viewBox="0 0 19.9 19.7"><titleid="title">Search</title><descid="desc">Search</desc><gclass="search-path"fill="none"><pathstroke-linecap="square"d="M18.5 18.3l-5.4-5.4"></path><circlecx="8"cy="8"r="7"></circle></g></svg></div><divid="search-container"><divid="search-space"><inputautocomplete="off"id="search-bar"name="search"type="text"aria-label="Search for something"placeholder="Search for something"/><divid="results-container"></div></div></div></div><divclass="darkmode"><inputclass="toggle"id="darkmode-toggle"type="checkbox"tabIndex="-1"/><labelid="toggle-label-light"for="darkmode-toggle"tabIndex="-1"><svgxmlns="http://www.w3.org/2000/svg"xmlnsXlink="http://www.w3.org/1999/xlink"version="1.1"id="dayIcon"x="0px"y="0px"viewBox="0 0 35 35"style="enable-background:new 0 0 35 35;"xmlSpace="preserve"><title>Light mode</title><pathd="M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5zM7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26zM17.5,6C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6zM27.5,9c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9zM6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06L6.439,8.561zM33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16zM28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,2
<p>However, if you’d like to publish your site to the world, you need a way to host it online. This guide will detail how to deploy with either GitHub Pages or Cloudflare pages but any service that allows you to deploy static HTML should work as well (e.g. Netlify, Replit, etc.)</p>
<p>Some Quartz features (like <ahref="./RSS-Feed"class="internal">RSS Feed</a> and sitemap generation) require <code>baseUrl</code> to be configured properly in your <ahref="./configuration"class="internal">configuration</a> to work properly. Make sure you set this before deploying!</p>
<li>Log in to the<ahref="https://dash.cloudflare.com/"class="external">Cloudflare dashboard</a>and select your account.</li>
<li>In Account Home, select<strong>Workers & Pages</strong>><strong>Create application</strong>><strong>Pages</strong>><strong>Connect to Git</strong>.</li>
<li>Select the new GitHub repository that you created and, in the<strong>Set up builds and deployments</strong>section, provide the following information:</li>
<p>Press “Save and deploy” and Cloudflare should have a deployed version of your site in about a minute. Then, every time you sync your Quartz changes to GitHub, your site should be updated.</p>
<p>To add a custom domain, check out <ahref="https://developers.cloudflare.com/pages/platform/custom-domains/"class="external">Cloudflare’s documentation</a>.</p>
<p>Like Quartz 3, you can deploy the site generated by Quartz 4 via GitHub Pages.</p>
<p>In your local Quartz, create a new file <code>quartz/.github/workflows/deploy.yml</code>.</p>
<divdata-rehype-pretty-code-fragment><divdata-rehype-pretty-code-titledata-language="yaml"data-theme="default">quartz/.github/workflows/deploy.yml</div><prestyle="background-color:var(--shiki-color-background);"tabindex="0"data-language="yaml"data-theme="default"><codedata-language="yaml"data-theme="default"><spandata-line><spanstyle="color:var(--shiki-token-keyword);">name</span><spanstyle="color:var(--shiki-token-keyword);">:</span><spanstyle="color:var(--shiki-color-text);"></span><spanstyle="color:var(--shiki-token-string-expression);">Deploy Quartz site to GitHub Pages</span></span>
<spandata-line><spanstyle="color:var(--shiki-color-text);"></span><spanstyle="color:var(--shiki-token-keyword);">fetch-depth</span><spanstyle="color:var(--shiki-token-keyword);">:</span><spanstyle="color:var(--shiki-color-text);"></span><spanstyle="color:var(--shiki-token-constant);">0</span><spanstyle="color:var(--shiki-color-text);"></span><spanstyle="color:var(--shiki-token-comment);"># Fetch all history for git info</span></span>
<li>Head to “Settings” tab of your forked repository and in the sidebar, click “Pages”. Under “Source”, select “GitHub Actions”.</li>
<li>Commit these changes by doing <code>npx quartz sync</code>. This should deploy your site to <code><github-username>.github.io/<repository-name></code>.</li>
<p>If you get an error about not being allowed to deploy to <code>github-pages</code> due to environment protection rules, make sure you remove any existing GitHub pages environments.</p>
<p>You can do this by going to your Settings page on your GitHub fork and going to the Environments tab and pressing the trash icon. The GitHub action will recreate the environment for you correctly the next time you sync your Quartz.</p>
<p>Here’s how to add a custom domain to your GitHub pages deployment.</p>
<ol>
<li>Head to the “Settings” tab of your forked repository.</li>
<li>In the “Code and automation” section of the sidebar, click “Pages”.</li>
<li>Under “Custom Domain”, type your custom domain and click “Save”.</li>
<li>This next step depends on whether you are using an apex domain (<code>example.com</code>) or a subdomain (<code>subdomain.example.com</code>).
<ul>
<li>If you are using an apex domain, navigate to your DNS provider and create an <code>A</code> record that points your apex domain to GitHub’s name servers which have the following IP addresses:
<ul>
<li><code>185.199.108.153</code></li>
<li><code>185.199.109.153</code></li>
<li><code>185.199.110.153</code></li>
<li><code>185.199.111.153</code></li>
</ul>
</li>
<li>If you are using a subdomain, navigate to your DNS provider and create a<code>CNAME</code>record that points your subdomain to the default domain for your site. For example, if you want to use the subdomain<code>quartz.example.com</code>for your user site, create a<code>CNAME</code>record that points<code>quartz.example.com</code>to<code><github-username>.github.io</code>.</li>
</ul>
</li>
</ol>
<p><imgsrc="./images/dns-records.png"width="auto"height="auto"/><em>The above shows a screenshot of Google Domains configured for both <code>jzhao.xyz</code> (an apex domain) and <code>quartz.jzhao.xyz</code> (a subdomain).</em></p>
<p>See the <ahref="https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain"class="external">GitHub documentation</a> for more detail about how to setup your own custom domain with GitHub Pages.</p>
<divclass="callout-title-inner"><p>Why aren't my changes showing up? </p></div>
</div>
<p>There could be many different reasons why your changes aren’t showing up but the most likely reason is that you forgot to push your changes to GitHub.</p>
<p>Make sure you save your changes to Git and sync it to GitHub by doing <code>npx quartz sync</code>. This will also make sure to pull any updates you may have made from other devices so you have them locally.</p>