If you want to host Quartz on a specific machine, it may be easier to [install Docker Compose](https://docs.docker.com/compose/install/) and follow the instructions below (than to [install Quartz's dependencies manually](notes/preview%20changes.md)).
If you want to host Quartz on a machine without using a webpage hosting service, it may be easier to [install Docker Compose](https://docs.docker.com/compose/install/) and follow the instructions below than to [install Quartz's dependencies manually](notes/preview%20changes.md).
## Hosting Quartz Locally
## Hosting Quartz Locally
You can serve Quartz locally at `http://localhost:1313` with the following script, replacing `/path/to/quartz` with the
You can serve Quartz locally at `http://localhost:1313` with the following script:
actual path to your Quartz folder.
docker-compose.yml
docker-compose.yml
```
```
@ -29,11 +28,9 @@ services:
- HUGO_APPENDPORT=true
- HUGO_APPENDPORT=true
```
```
By default, the container will clone and serve `github:jackyzha0/quartz`. However, you can serve your own fork of `quartz` by cloning to the above `/path/to/quartz` directory.
Then run with: `docker-compose up -d` in the same directory as your `docker-compose.yml` file.
Then run with: `docker-compose up -d` in the same directory as your `docker-compose.yml` file.
While the container is running, you can update their`quartz` fork with: `docker exec -it quartz-hugo make update`.
While the container is running, you can update the `quartz` fork with: `docker exec -it quartz-hugo make update`.
If you prefer, you can preview changes by [hosting locally with Docker](notes/docker.md) instead! If you have Docker, this might be the easiest approach.
For those who like to live life more on the edge, viewing the garden through Obsidian gets you pretty close to the real thing.
For those who like to live life more on the edge, viewing the garden through Obsidian gets you pretty close to the real thing.
## Publishing Changes
## Publishing Changes
@ -65,10 +63,4 @@ Now that you know the basics of managing your digital garden using Quartz, you c
Natural language search is powered by [Operand](https://operand.ai/). It understands language like a person does and finds results that best match user intent. In this sense, it is closer to how Google Search works.
Natural language search is powered by [Operand](https://beta.operand.ai/). It understands language like a person does and finds results that best match user intent. In this sense, it is closer to how Google Search works.
Natural language search tends to produce higher quality results than full-text search.
Natural language search tends to produce higher quality results than full-text search.
Here's how to set it up.
Here's how to set it up.
1. Create an Operand Account on [their website](https://operand.ai/).
1. Login or Register for a new Operand account. Click the verification link sent to your email, and you'll be redirected to the dashboard. (Note) You do not need to enter a credit card to create an account, or get started with the Operand API. The first $10 of usage each month is free. To learn more, see pricing. If you go over your free quota, we'll (politely) reach out and ask you to configure billing.
2. Go to Dashboard > Settings > Integrations.
2. Create your first index. On the dashboard, under "Indexes", enter the name and description of your index, and click "Create Index". Note down the ID of the index (obtained by clicking on the index name in the list of indexes), as you'll need it in the next step. IDs are unique to each index, and look something like `uqv1duxxbdxu`.
3. Follow the steps to setup the GitHub integration. Operand needs access to GitHub in order to index your digital garden properly!
3. Click into the index you've created. Under "Index Something", select "SITEMAP" from the dropdown and click "Add Source".
4. Head over to Dashboard > Objects and press `(Cmd + K)` to open the omnibar and select 'Create Collection'.
4. For the "Sitemap.xml URL", put your deployed site's base URL followed by `sitemap.xml`. For example, for `quartz.jzhao.xyz`, put `https://quartz.jzhao.xyz/sitemap.xml`. Leave the URL Regex empty.
1. Set the 'Collection Label' to something that will help you remember it.
5. Get your API key. On the dashboard, under "API Keys", you can manage your API keys. If you don't already have an API key, click "Create API Key". You'll need this for the next step.
2. You can leave the 'Parent Collection' field empty.
6. Open `data/config.yaml`. Set `enableSemanticSearch` to `true`, `operandApiKey` to your copied key, and `operandIndexId` to the ID of the index we created from earlier..
5. Click into your newly made Collection.
1. Press the 'share' button that looks like three dots connected by lines.
2. Set the 'Interface Type' to `object-search` and click 'Create'.
3. This will bring you to a new page with a search bar. Ignore this for now.
6. Go back to Dashboard > Settings > API Keys and find your Quartz-specific Operand API key under 'Other keys'.
1. Copy the key (which looks something like `0e733a7f-9b9c-48c6-9691-b54fa1c8b910`).
2. Open `data/config.yaml`. Set `enableSemanticSearch` to `true` and `operandApiKey` to your copied key.
7. Make a commit and push your changes to GitHub. See the [[notes/hosting|hosting]] page if you haven't done this already.
7. Push your changes to the site and wait for it to deploy.
1. This step is *required* for Operand to be able to properly index your content.
8. Check the Operand dashboard and wait for your site to index. Enjoy natural language search powered by Operand!
2. Head over to Dashboard > Objects and select the collection that you made earlier
8. Press `(Cmd + K)` to open the omnibar again and select 'Create GitHub Repo'
1. Set the 'Repository Label' to `Quartz`
2. Set the 'Repository Owner' to your GitHub username
3. Set the 'Repository Ref' to `master`
4. Set the 'Repository Name' to the name of your repository (usually just `quartz` if you forked the repository without changing the name)
5. Leave 'Root Path' and 'Root URL' empty
9. Wait for your repository to index and enjoy natural language search in Quartz! Operand refreshes the index every 2h so all you need to do is just push to GitHub to update the contents in the search.