All Categories
Setup
6 notes with this tag
diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/404.html b/404.html new file mode 100644 index 000000000..2b059c19f --- /dev/null +++ b/404.html @@ -0,0 +1,16 @@ +
Search
Search
Host your second brain and +digital garden for free. Quartz features
Check out some of the +amazing gardens that community members have published with Quartz or read about +why I made Quartz to begin with.
π Step 1: +Setup your own digital garden using Quartz
Returning user? Figure out how to update your existing Quartz garden.
If you prefer browsing the contents of this site through a list instead of a graph, you see a list of all +setup-related notes.
${highlight(removeMarkdown(n.content),o.dataset.ctx)}...
+ +${removeMarkdown(n.content).split(" ",20).join(" ")}...
+ +Search
ε δΉε¨ζ们ζθ―ε°δΉεοΌζ们已η»η¦»εΌδΊε°ι’γ
μ°λ¦¬κ° κ·Έκ²μ μκΈ°λ μ μ μ°λ¦¬λ λ μ λ λ¬μ΅λλ€.
η§γγ‘γγγγη₯γγ»γΌεγ«γη§γγ‘γ―ε°ι’γι’γγ¦γγΎγγγ
Block math works with two dollar signs $$...$$
$$f(x) = \int_{-\infty}^\infty +f\hat(\xi),e^{2 \pi i \xi x} +,d\xi$$
Inline math also works with single dollar signs $...$. For example, Euler’s identity but inline: $e^{i\pi} = 0$
Aligned equations work quite well:
$$ +\begin{aligned} +a &= b + c \\&= e + f \\\end{aligned} +$$
And matrices
$$ +\begin{bmatrix} +1 & 2 & 3 \\a & b & c +\end{bmatrix} +$$
More information on configuring RTL languages like Arabic in the +config page.
Search
Quartz supports the same Admonition-callout syntax as Obsidian.
This includes
See +documentation on supported types and syntax here.
Examples
Aliases: example
Notes
Aliases: note
Summaries
Aliases: abstract, summary, tldr
Info
Aliases: info, todo
Hint
Aliases: tip, hint, important
Success
Aliases: success, check, done
Question
Aliases: question, help, faq
Warning
Aliases: warning, caution, attention
Failure
Aliases: failure, fail, missing
Error
Aliases: danger, error
Bug
Aliases: bug
Quote
Aliases: quote, cite
Search
Quartz is designed to be extremely configurable. You can find the bulk of the configuration scattered throughout the repository depending on how in-depth you’d like to get.
The majority of configuration can be found under data/config.yaml. An annotated example configuration is shown below.
| |
To add code block titles with Quartz:
Ensure that code block titles are enabled in Quartz’s configuration:
enableCodeBlockTitle: true
+Add the title attribute to the desired
+code block
+fence:
```yaml {title="data/config.yaml"}
+ enableCodeBlockTitle: true # example from step 1
+ ```
+Note that if {title=<my-title>} is included, and code block titles are not
+enabled, no errors will occur, and the title attribute will be ignored.
If you would like to customize the favicons of your Quartz-based website, you
+can add them to the data/config.yaml file. The default without any set
+favicon key is:
| |
The default can be overridden by defining a value to the favicon key in your
+data/config.yaml file. For example, here is a List[Dictionary] example format, which is
+equivalent to the default:
favicon:
+ - { rel: "shortcut icon", href: "icon.png", type: "image/png" }
+# - { ... } # Repeat for each additional favicon you want to add
+In this format, the keys are identical to their HTML representations.
If you plan to add multiple favicons generated by a website (see list below), it +may be easier to define it as HTML. Here is an example which appends the +Apple touch icon to Quartz’s default favicon:
favicon: |
+ <link rel="shortcut icon" href="icon.png" type="image/png">
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+This second favicon will now be used as a web page icon when someone adds your +webpage to the home screen of their Apple device. If you are interested in more +information about the current and past standards of favicons, you can read +this article.
Note that all generated favicon paths, defined by the href
+attribute, are relative to the static/ directory.
To customize the Interactive Graph view, you can poke around data/graphConfig.yaml.
| |
Want to go even more in-depth? You can add custom CSS styling and change existing colours through editing assets/styles/custom.scss. If you’d like to target specific parts of the site, you can add ids and classes to the HTML partials in /layouts/partials.
Partials are what dictate what gets rendered to the page. Want to change how pages are styled and structured? You can edit the appropriate layout in /layouts.
For example, the structure of the home page can be edited through /layouts/index.html. To customize the footer, you can edit /layouts/partials/footer.html
More info about partials on +Hugo’s website.
Still having problems? Checkout our +FAQ and Troubleshooting guide.
CJK + Latex Support (ζ΅θ―) comes out of the box with Quartz.
Want to support languages that read from right-to-left (like Arabic)? Hugo (and by proxy, Quartz) supports this natively.
Follow the steps
+Hugo provides here and modify your config.toml
For example:
| |
Search
This step is only applicable if you are using a custom domain! If you are using a <YOUR-USERNAME>.github.io domain, you can skip this step.
For this last bit to take effect, you also need to create a CNAME record with the DNS provider you register your domain with (i.e. NameCheap, Google Domains).
GitHub has some +documentation on this, but the tldr; is to
Go to your forked repository (github.com/<YOUR-GITHUB-USERNAME>/quartz) settings page and go to the Pages tab. Under “Custom domain”, type your custom domain, then click Save.
Go to your DNS Provider and create a CNAME record that points from your domain to <YOUR-GITHUB-USERNAME.github.io. (yes, with the trailing period).
Example Configuration for Quartz
Wait 30 minutes to an hour for the network changes to kick in.
Done!
Search
Quartz runs on top of +Hugo so all notes are written in +Markdown.
Here’s a rough overview of what’s what.
All content in your garden can found in the /content folder. To make edits, you can open any of the files and make changes directly and save it. You can organize content into any folder you’d like.
To edit the main home page, open /content/_index.md.
To create a link between notes in your garden, just create a normal link using Markdown pointing to the document in question. Please note that all links should be relative to the root /content path.
| |
Similarly, you can put local images anywhere in the /content folder.
| |
You can also use wikilinks if that is what you are more comfortable with!
Hugo is picky when it comes to metadata for files. Make sure that your title is double-quoted and that you have a title defined at the top of your file like so. You can also add tags here as well.
| |
I recommend using +Obsidian as a way to edit and grow your digital garden. It comes with a really nice editor and graphical interface to preview all of your local files.
This step is highly recommended.
π Step 3: +How to setup your Obsidian Vault to work with Quartz
This step is purely optional and mostly for those who want to see the published version of their digital garden locally before opening it up to the internet. This is highly recommended but not required.
π Step 4: +Preview Quartz Changes
For those who like to live life more on the edge, viewing the garden through Obsidian gets you pretty close to the real thing.
Now that you know the basics of managing your digital garden using Quartz, you can publish it to the internet!
π Step 5: +Hosting Quartz online!
Having problems? Checkout our +FAQ and Troubleshooting guide.
Search
Quartz is designed to be effortless to deploy. If you forked and cloned Quartz directly from the repository, everything should already be good to go! Follow the steps below.
By default, GitHub disables workflows from running automatically on Forked Repostories. Head to the ‘Actions’ tab of your forked repository and Enable Workflows to setup deploying your Quartz site!
Enable GitHub Actions
Head to the ‘Settings’ tab of your forked repository and go to the ‘Pages’ tab.
master (and not hugo) using / (root)
Enable GitHub Pages
To see your changes on the internet, we need to push it them to GitHub. Quartz is a git repository so updating it is the same workflow as you would follow as if it were just a regular software project.
| |
Note: we specifically push to the hugo branch here. Our GitHub action automatically runs everytime a push to is detected to that branch and then updates the master branch for redeployment.
Now let’s get this site up and running. Never hosted a site before? No problem. Have a fancy custom domain you already own or want to subdomain your Quartz? That’s easy too.
Here, we take advantage of GitHub’s free page hosting to deploy our site. Change baseURL in /config.toml.
Make sure that your baseURL has a trailing /!
| |
If you are using this under a subdomain (e.g. <YOUR-GITHUB-USERNAME>.github.io/quartz), include the trailing /. You need to do this especially if you are using GitHub!
| |
Change cname in /.github/workflows/deploy.yaml. Again, if you don’t have a custom domain to use, you can use <YOUR-USERNAME>.github.io.
Please note that the cname field should not have any path e.g. end with /quartz or have a trailing /.
| |
Have a custom domain? +Learn how to set it up with Quartz .
Only want to publish a subset of all of your notes? Don’t worry, Quartz makes this a simple two-step process.
β +Excluding pages from being published
Now that your Quartz is live, let’s figure out how to make Quartz really yours!
Step 6: π¨ +Customizing Quartz
Having problems? Checkout our +FAQ and Troubleshooting guide.
Search
Edit ignoreFiles in config.toml to include paths you’d like to exclude from being rendered.
| |
ignoreFiles supports the use of Regular Expressions (RegEx) so you can ignore patterns as well (e.g. ignoring all .pngs by doing \\.png$).
+To ignore a specific file, you can also add the tag draft: true to the frontmatter of a note.
| |
More details in +Hugo’s documentation.
However, just adding to the ignoreFiles will only prevent the page from being access through Quartz. If you want to prevent the file from being pushed to GitHub (for example if you have a public repository), you need to also add the path to the .gitignore file at the root of the repository.
Search
Search
Obsidian is the preferred way to use Quartz. You can either create a new Obsidian Vault or link one that your already have.
If you don’t have an existing Vault,
+download Obsidian and create a new Vault in the /content folder that you created and cloned during the
+setup step.
The easiest way to use an existing Vault is to copy all of your files (directory and hierarchies intact) into the /content folder.
Great, now that you have your Obsidian linked to your Quartz, let’s fix some settings so that they play well.
Obsidian Settings
Inserting front matter everytime you want to create a new Note gets annoying really quickly. Luckily, Obsidian supports templates which makes inserting new content really easily.
If you decide to overwrite the /content folder completely, don’t remove the /content/templates folder!
Head over to Options > Core Plugins and enable the Templates plugin. Then go to Options > Hotkeys and set a hotkey for ‘Insert Template’ (I recommend [cmd]+T). That way, when you create a new note, you can just press the hotkey for a new template and be ready to go!
π Step 4: +Preview Quartz Changes
Search
β[One] who works with the door open gets all kinds of interruptions, but [they] also occasionally gets clues as to what the world is and what might be important.β β Richard Hamming
Hosting a public digital garden isn’t easy. There are an overwhelming number of tutorials, resources, and guides for tools like +Notion, +Roam, and +Obsidian, yet none of them have super easy to use free tools to publish that garden to the world.
I’ve personally found that
I was really inspired by +Bianca and +Joel’s digital gardens and wanted to try making my own.
The goal of Quartz is to make hosting your own public digital garden free and simple. You don’t even need your own website. Quartz does all of that for you and gives your own little corner of the internet.
Search
If you’d like to preview what your Quartz site looks like before deploying it to the internet, here’s exactly how to do that!
Note that both of these steps need to be completed.
hugo-obsidianThis step will generate the list of backlinks for Hugo to parse. Ensure you have +Go (>= 1.16) installed.
| |
If you are running into an error saying that command not found: hugo-obsidian, make sure you set your GOPATH correctly! This will allow your terminal to correctly recognize hugo-obsidian as an executable.
Afterwards, start the Hugo server as shown above and your local backlinks and interactive graph should be populated!
Hugo is the static site generator that powers Quartz. +Install Hugo with “extended” Sass/SCSS version first. Then,
| |
π Step 5: +Hosting Quartz online!
Search
Quartz supports two modes of searching through content.
Full-text search is the default in Quartz. It produces results that exactly match the search query. This is easier to setup but usually produces lower quality matches.
| |
Natural language search is powered by +Operand. 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.
Here’s how to set it up.
(Cmd + K) to open the omnibar and select ‘Create Collection’.object-search and click ‘Create’.0e733a7f-9b9c-48c6-9691-b54fa1c8b910).data/config.yaml. Set enableSemanticSearch to true and operandApiKey to your copied key. | |
(Cmd + K) to open the omnibar again and select ‘Create GitHub Repo’Quartzmasterquartz if you forked the repository without changing the name)Search
Setting up Quartz requires a basic understanding of git. If you are unfamiliar,
+this resource is a great place to start!
A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
Navigate to the GitHub repository for the Quartz project:
π +Quartz Repository
Then, Fork the repository into your own GitHub account. If you don’t have an account, you can make on for free +here. More details about forking a repo can be found on +GitHub’s documentation.
After you’ve made a fork of the repository, you need to download the files locally onto your machine. Ensure you have git, then type the following command replacing YOUR-USERNAME with your GitHub username.
| |
Great! Now you have everything you need to start editing and growing your digital garden. If you’re ready to start writing content already, check out the recommended flow for editing notes in Quartz.
βοΈ Step 2: +Editing Notes in Quartz
Having problems? Checkout our +FAQ and Troubleshooting guide.
Search
Want to see what Quartz can do? Here are some cool community gardens :)
If you want to see your own on here, submit a +Pull Request adding yourself to this file!
Search
Still having trouble? Here are a list of common questions and problems people encounter when installing Quartz.
While you’re here, join our +Discord :)
Yes! See +CJK + Latex Support (ζ΅θ―) for a brief demo.
Unless it produces direct Markdown output in the file, no. There currently is no way to bundle plugin code with Quartz.
The easiest way would be to add your own HTML partial that supports the functionality you are looking for.
Make sure you set the source to deploy from master (and not hugo) using / (root)! See more in the
+hosting guide
This is a problem caused by git treating files as case-insensitive by default and some of your posts probably have capitalized file names. You can turn this off in your Quartz by running this command.
| |
Yes! Quartz makes selective publishing really easy. Heres a guide on +excluding pages from being published.
Yes! All built files can be found under /public in the master branch. More details under
+hosting.
command not found: hugo-obsidianMake sure you set your GOPATH correctly! This will allow your terminal to correctly recognize hugo-obsidian as an executable.
| |
You probably forgot to include front matter in your Markdown files. You can either setup +Obsidian to do this for you or you need to manually define it. More details in +the ‘how to edit’ guide.
Walk through the steps in +the hosting guide again. Make sure you wait 30 min to 1 hour for changes to take effect.
You can edit it in config.toml and either use a V3 (UA-) or V4 (G-) tag.
To edit the main home page, open /content/_index.md.
You can change the theme by editing assets/custom.scss. More details on customization and themeing can be found in the
+customization guide.
You can put images anywhere in the /content folder.
| |
By default, the linkIndex.json (which Quartz needs to generate the Interactive Graph and Backlinks) are not regenerated locally. To set that up, see the guide on
+local editing
Not out of the box. You could probably make it work by editing /layouts/_default/single.html but that’s not what Quartz is designed to work with. 99% of things you are trying to do with those frameworks you can accomplish perfectly fine using just vanilla HTML/CSS/JS.
Quartz isn’t perfect! If you’re still having troubles, file an issue in the GitHub repo with as much information as you can reasonably provide. Alternatively, you can message me on +Twitter and I’ll try to get back to you as soon as I can.
π +Submit an Issue
Search
Haven’t updated Quartz in a while and want all the cool new optimizations? On Unix/Mac systems you can run the following command for a one-line update! This command will show you a log summary of all commits since you last updated, press q to acknowledge this. Then, it will show you each change in turn and press y to accept the patch or n to reject it. Usually you should press y for most of these unless it conflicts with existing changes you’ve made!
| |
Or, if you don’t want the interactive parts and just want to force update your local garden (this assumed that you are okay with some of your personalizations been overriden!)
| |
Or, manually checkout the changes yourself.
Warning!
If you customized the files in
data/, or anything insidelayouts/, your customization may be overwritten! +Make sure you have a copy of these changes if you don’t want to lose them.
| |
Search
Search