docs: clarified and extended installation guide
This commit is contained in:
@@ -4,15 +4,38 @@ aliases:
|
||||
- "setting up your GitHub repository"
|
||||
---
|
||||
|
||||
This page walks you through the full Quartz setup: from cloning the repository to previewing your site locally, then pushing it to GitHub.
|
||||
This page walks you through the full Quartz setup: from getting the source code to previewing your site locally, then pushing it to GitHub.
|
||||
|
||||
## 1. Clone Quartz
|
||||
## 1. Get Quartz
|
||||
|
||||
There are two ways to get started. Pick whichever you prefer:
|
||||
|
||||
### Option A: Use the GitHub Template (Recommended)
|
||||
|
||||
> [!tip] Why this option?
|
||||
> Using the template creates your own repository in one click — no need to reconfigure Git remotes later.
|
||||
|
||||
1. Go to the [Quartz repository](https://github.com/jackyzha0/quartz) and click **Use this template** → **Create a new repository**
|
||||
2. Give your repository a name (e.g. `quartz`, `notes`, `garden`), choose public or private, then click **Create repository**
|
||||
3. Clone **your new repository** and enter the folder:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/<your-username>/<your-repo>.git
|
||||
cd <your-repo>
|
||||
```
|
||||
|
||||
### Option B: Clone Directly
|
||||
|
||||
If you don't use GitHub or prefer a manual setup:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/jackyzha0/quartz.git
|
||||
cd quartz
|
||||
```
|
||||
|
||||
> [!note]
|
||||
> With this option, you'll need to [[#Connect Your Local Clone|point the `origin` remote]] to your own repository later when you're ready to publish.
|
||||
|
||||
## 2. Install Dependencies
|
||||
|
||||
> [!important]
|
||||
@@ -78,11 +101,14 @@ At this point you can [[authoring-content|start writing content]] in the `conten
|
||||
|
||||
## Setting Up Your GitHub Repository
|
||||
|
||||
To publish your site, you'll need your own GitHub repository.
|
||||
> [!note]
|
||||
> If you used **Option A** (GitHub Template) in step 1, your repository already exists and `origin` is already set. You can skip straight to [[#Push Your Site]].
|
||||
|
||||
To publish your site, you'll need your own GitHub repository. This section is for **Option B** (direct clone) users.
|
||||
|
||||
### Create the Repository
|
||||
|
||||
Create a new repository on [GitHub.com](https://github.com/new). Do **not** initialize it with a README, license, or `.gitignore` — the Quartz clone already has these.
|
||||
Create a new repository on [GitHub.com](https://github.com/new). Do **not** initialize it with a README, license, or `.gitignore` — Quartz already includes these files, and duplicating them will cause merge conflicts on your first push.
|
||||
|
||||
![[github-init-repo-options.png]]
|
||||
|
||||
@@ -100,11 +126,11 @@ git remote -v
|
||||
|
||||
# Point origin to your repository
|
||||
git remote set-url origin REMOTE-URL
|
||||
|
||||
# Add the official Quartz repo as upstream (for future upgrades)
|
||||
git remote add upstream https://github.com/jackyzha0/quartz.git
|
||||
```
|
||||
|
||||
> [!tip]
|
||||
> You don't need to add an `upstream` remote manually — `npx quartz create` already configured it for you. The upstream remote is used by `npx quartz upgrade` to pull in future Quartz updates.
|
||||
|
||||
### Push Your Site
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user