mobile fixes, fix bug when linking to anchor on home, docs

This commit is contained in:
Jacky Zhao
2023-08-06 17:09:29 -07:00
parent db6054a8c1
commit 028bcec62c
14 changed files with 134 additions and 24 deletions

View File

@ -2,6 +2,49 @@
title: Hosting
---
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. 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.)
## GitHub Pages
Like Quartz 3, you can deploy the site generated by Quartz 4 via GitHub Pages.
In your local Quartz, create a new file `quartz/.github/workflows/deploy.yaml`:
```yaml title="quartz/.github/workflows/deploy.yaml"
name: Deploy to GitHub Pages
on:
push:
branches:
- v4-alpha
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for git info
- uses: actions/setup-node@v3
with:
node-version: 18.14
- name: Install Dependencies
run: npm ci
- name: Build Quartz
run: npx quartz build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: master # deploying branch
cname: quartz.jzhao.xyz
```
Then, the next time you
## Cloudflare Pages