From 2563afe44a8423707fc50d304cf7fee72f7a5537 Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Mon, 19 Jul 2021 18:02:16 -0400 Subject: [PATCH] doc bump --- config.toml | 5 +++- content/_index.md | 2 ++ content/moc/directory.md | 2 +- content/moc/showcase.md | 3 ++- content/notes/editing.md | 38 ++++++++----------------------- content/notes/external-hosting.md | 6 +++++ content/notes/hosting.md | 7 ++++-- content/notes/ignore-notes.md | 22 ++++++++++++++++++ content/notes/preview-changes.md | 34 +++++++++++++++++++++++++++ content/notes/troubleshooting.md | 6 +++++ content/private/private-note.md | 5 ++++ layouts/404.html | 2 +- 12 files changed, 97 insertions(+), 35 deletions(-) create mode 100644 content/notes/external-hosting.md create mode 100644 content/notes/ignore-notes.md create mode 100644 content/notes/preview-changes.md create mode 100644 content/private/private-note.md diff --git a/config.toml b/config.toml index 8283123..884b5b1 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 c24bd6f..3d19704 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 5eee52f..b77f2ee 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 3c2a0b4..173ac57 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 0975f49..db76af8 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 0000000..4d2ba00 --- /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 db42aa1..7a5973c 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 0000000..21e106a --- /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 7d508c6..3a96659 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 0000000..6930c10 --- /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 232fada..8494910 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.