diff --git a/config.toml b/config.toml index 828312350..884b5b126 100644 --- a/config.toml +++ b/config.toml @@ -2,7 +2,10 @@ baseURL = "https://quartz.jzhao.xyz/" languageCode = "en-us" googleAnalytics = "G-XYFD95KB4J" pygmentsUseClasses = true -ignoreFiles = ["/content/templates/*"] +ignoreFiles = [ + "/content/templates/*", + "/content/private/*", +] [markup] [markup.tableOfContents] diff --git a/content/_index.md b/content/_index.md index c24bd6f08..3d19704a0 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,4 +1,6 @@ # 🌱 Quartz +## v1.1 + Simple second brain and [digital garden](https://jzhao.xyz/posts/digital-gardening). ## Why Quartz? diff --git a/content/moc/directory.md b/content/moc/directory.md index 5eee52ff9..b77f2ee5b 100644 --- a/content/moc/directory.md +++ b/content/moc/directory.md @@ -12,7 +12,7 @@ Let's get to business and get you started! - 🎨 [Customizing and Styling Quartz](notes/config.md) - 🌍 [Hosting Quartz online!](notes/hosting.md) -Not convinced yet? Look at some [cool community digital gardens](moc/showcase)! +Not convinced yet? Look at some [community digital gardens](moc/showcase) built with Quartz! ## Troubleshooting - 🚧 [Troubleshooting and FAQ](notes/troubleshooting.md) diff --git a/content/moc/showcase.md b/content/moc/showcase.md index 3c2a0b4a7..173ac575d 100644 --- a/content/moc/showcase.md +++ b/content/moc/showcase.md @@ -5,6 +5,7 @@ title: "Showcase" Want to see what Quartz can do? Here are some cool community gardens :) - [Quartz Documentation (this site!)](https://quartz.jzhao.xyz/) -- [Jacky Zhao's Garden](https://jzhao.xyz/toc/directory/) +- [Jacky Zhao](https://jzhao.xyz/toc/directory/) +- [Anson Yu](http://garden.ansonyu.me/) If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/hugo/content/moc/showcase.md)! \ No newline at end of file diff --git a/content/notes/editing.md b/content/notes/editing.md index 0975f4926..db76af8a5 100644 --- a/content/notes/editing.md +++ b/content/notes/editing.md @@ -10,7 +10,12 @@ I *strongly* recommend using [Obsidian](http://obsidian.md/) as a way to edit an **🔗 [How to link your Obsidian Vault](notes/obsidian.md)** -Of course, all the files are in Markdown so you could just use your favourite text editor of choice, I'm not going to stop you! +Of course, all the files are in Markdown so you could just use your favourite text editor of choice. + +### Ignoring Files +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](notes/ignore-notes.md) ### Folder Structure Here's a rough overview of what's what. @@ -38,36 +43,11 @@ Rest of your content here... ``` ## Previewing Changes -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. For those who like to live life more on the edge, viewing the garden through Obsidian gets you pretty close to the real thing. +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*. -### Install `hugo-obsidian` -This step will generate the list of backlinks for Hugo to parse. Ensure you have [Go](https://golang.org/doc/install) (>= 1.16) installed. +👀 [Preview Quartz Changes](notes/preview-changes.md) -```shell -# Install and link `hugo-obsidian` locally -$ go install github.com/jackyzha0/hugo-obsidian - -# Navigate to your local Quartz folder -$ cd - -# Scrape all links in your Quartz folder and generate info for Quartz -$ hugo-obsidian -input=content -output=data -``` - -Afterwards, start the Hugo server as shown above and your local backlinks and interactive graph should be populated! - -### Installing Hugo -Hugo is the static site generator that powers Quartz. If you'd like to preview your site locally, [install Hugo](https://gohugo.io/getting-started/installing/). - -``` -# Navigate to your local Quartz folder -$ cd - -# Start local server -$ hugo server - -# View your site in a browser at http://localhost:1313/ -``` +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 Now that you know the basics of managing your digital garden using Quartz, you can publish it to the internet! diff --git a/content/notes/external-hosting.md b/content/notes/external-hosting.md new file mode 100644 index 000000000..4d2ba008d --- /dev/null +++ b/content/notes/external-hosting.md @@ -0,0 +1,6 @@ +--- +title: "External Hosting" +--- + + + diff --git a/content/notes/hosting.md b/content/notes/hosting.md index db42aa179..7a5973c61 100644 --- a/content/notes/hosting.md +++ b/content/notes/hosting.md @@ -1,8 +1,7 @@ --- -title: "Deploying to GitHub Pages" +title: "Deploying Quartz to the Web" --- - ## GitHub Pages 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! You can head to `" +] +``` + +`ignoreFiles` supports the use of Regular Expressions (RegEx) so you can ignore patterns as well (e.g. ignoring all `.png`s by doing `\\.png$`). + +More details in [Hugo's documentation](https://gohugo.io/getting-started/configuration/#ignore-content-and-data-files-when-rendering). + +### Global Ignore +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. \ No newline at end of file diff --git a/content/notes/preview-changes.md b/content/notes/preview-changes.md new file mode 100644 index 000000000..21e106ad8 --- /dev/null +++ b/content/notes/preview-changes.md @@ -0,0 +1,34 @@ +--- +title: "Preview Changes" +--- + +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! + +## Install `hugo-obsidian` +This step will generate the list of backlinks for Hugo to parse. Ensure you have [Go](https://golang.org/doc/install) (>= 1.16) installed. + +```shell +# Install and link `hugo-obsidian` locally +$ go install github.com/jackyzha0/hugo-obsidian + +# Navigate to your local Quartz folder +$ cd + +# Scrape all links in your Quartz folder and generate info for Quartz +$ hugo-obsidian -input=content -output=data +``` + +Afterwards, start the Hugo server as shown above and your local backlinks and interactive graph should be populated! + +## Installing Hugo +Hugo is the static site generator that powers Quartz. If you'd like to preview your site locally, [install Hugo](https://gohugo.io/getting-started/installing/). + +``` +# Navigate to your local Quartz folder +$ cd + +# Start local server +$ hugo server + +# View your site in a browser at http://localhost:1313/ +``` \ No newline at end of file diff --git a/content/notes/troubleshooting.md b/content/notes/troubleshooting.md index 7d508c638..3a966592f 100644 --- a/content/notes/troubleshooting.md +++ b/content/notes/troubleshooting.md @@ -3,6 +3,12 @@ title: "Troubleshooting and FAQ" --- ## Common Pitfalls +### Can I publish only a subset of my pages? +Yes! Quartz makes selective publishing really easy. Heres a guide on [excluding pages from being published](notes/ignore-notes.md). + +### Can I host this myself and not on GitHub Pages? +Yes! All built files can be found under `/public` in the `master` branch. More details under [hosting](notes/hosting.md). + ### Do I need a website already? No! Setting up Quartz means you set up a site too :) diff --git a/content/private/private-note.md b/content/private/private-note.md new file mode 100644 index 000000000..6930c102c --- /dev/null +++ b/content/private/private-note.md @@ -0,0 +1,5 @@ +--- +title: "Private Stuff" +--- + +This page doesn't get published! \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html index 232fada8b..849491011 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -7,7 +7,7 @@ {{partial "darkmode.html" .}}

404.

-

Hey! You look a little lost.

+

Hey! You look a little lost. This page doesn't exist (or may be private).

↳ Let's get you home.