forked from jackyzha0/quartz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v4-upstream' into v4-update
- Loading branch information
Showing
113 changed files
with
6,134 additions
and
3,014 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ tsconfig.tsbuildinfo | |
.obsidian | ||
.quartz-cache | ||
private/ | ||
.replit | ||
replit.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:20-slim as builder | ||
WORKDIR /usr/src/app | ||
COPY package.json . | ||
COPY package-lock.json* . | ||
RUN npm ci | ||
|
||
FROM node:20-slim | ||
WORKDIR /usr/src/app | ||
COPY --from=builder /usr/src/app/ /usr/src/app/ | ||
COPY . . | ||
CMD ["npx", "quartz", "build", "--serve"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Conflicts | ||
Please resolve them and commit them using the commands `Obsidian Git: Commit all changes` followed by `Obsidian Git: Push` | ||
(This file will automatically be deleted before commit) | ||
[[#Additional Instructions]] available below file list | ||
|
||
- Not a file: docs/index.md | ||
- Not a file: quartz.config.ts | ||
- Not a file: quartz.layout.ts | ||
- Not a file: quartz/plugins/emitters/contentIndex.ts | ||
- Not a file: quartz/util/escape.ts | ||
|
||
# Additional Instructions | ||
I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text. | ||
|
||
```diff | ||
<<<<<<< HEAD | ||
File changes in local repository | ||
======= | ||
File changes in remote repository | ||
>>>>>>> origin/main | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: "Advanced" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Quartz comes shipped with a Docker image that will allow you to preview your Quartz locally without installing Node. | ||
|
||
You can run the below one-liner to run Quartz in Docker. | ||
|
||
```sh | ||
docker run --rm -itp 8080:8080 $(docker build -q .) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
tags: | ||
- plugin/transformer | ||
--- | ||
|
||
[org-roam](https://www.orgroam.com/) is a plain-text personal knowledge management system for [emacs](https://en.wikipedia.org/wiki/Emacs). [ox-hugo](https://github.com/kaushalmodi/ox-hugo) is org exporter backend that exports `org-mode` files to [Hugo](https://gohugo.io/) compatible Markdown. | ||
|
||
Because the Markdown generated by ox-hugo is not pure Markdown but Hugo specific, we need to transform it to fit into Quartz. This is done by `Plugin.OxHugoFlavouredMarkdown`. Even though this [[making plugins|plugin]] was written with `ox-hugo` in mind, it should work for any Hugo specific Markdown. | ||
|
||
```typescript title="quartz.config.ts" | ||
plugins: { | ||
transformers: [ | ||
Plugin.FrontMatter({ delims: "+++", language: "toml" }), // if toml frontmatter | ||
// ... | ||
Plugin.OxHugoFlavouredMarkdown(), | ||
Plugin.GitHubFlavoredMarkdown(), | ||
// ... | ||
], | ||
}, | ||
``` | ||
|
||
## Usage | ||
|
||
Quartz by default doesn't understand `org-roam` files as they aren't Markdown. You're responsible for using an external tool like `ox-hugo` to export the `org-roam` files as Markdown content to Quartz and managing the static assets so that they're available in the final output. | ||
|
||
## Configuration | ||
|
||
- Link resolution | ||
- `wikilinks`: Whether to replace `{{ relref }}` with Quartz [[wikilinks]] | ||
- `removePredefinedAnchor`: Whether to remove [pre-defined anchor set by ox-hugo](https://ox-hugo.scripter.co/doc/anchors/). | ||
- Image handling | ||
- `replaceFigureWithMdImg`: Whether to replace `<figure/>` with `![]()` | ||
- Formatting | ||
- `removeHugoShortcode`: Whether to remove hugo shortcode syntax (`{{}}`) | ||
- `replaceOrgLatex`: Whether to replace org-mode formatting for latex fragments with what `Plugin.Latex` supports. | ||
|
||
> [!warning] | ||
> | ||
> While you can use `Plugin.OxHugoFlavoredMarkdown` and `Plugin.ObsidianFlavoredMarkdown` together, it's not recommended because it might mutate the file in unexpected ways. Use with caution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: "Breadcrumbs" | ||
tags: | ||
- component | ||
--- | ||
|
||
Breadcrumbs provide a way to navigate a hierarchy of pages within your site using a list of its parent folders. | ||
|
||
By default, the element at the very top of your page is the breadcrumb navigation bar (can also be seen at the top on this page!). | ||
|
||
## Customization | ||
|
||
Most configuration can be done by passing in options to `Component.Breadcrumbs()`. | ||
|
||
For example, here's what the default configuration looks like: | ||
|
||
```typescript title="quartz.layout.ts" | ||
Component.Breadcrumbs({ | ||
spacerSymbol: "❯", // symbol between crumbs | ||
rootName: "Home", // name of first/root element | ||
resolveFrontmatterTitle: true, // whether to resolve folder names through frontmatter titles | ||
hideOnRoot: true, // whether to hide breadcrumbs on root `index.md` page | ||
showCurrentPage: true, // wether to display the current page in the breadcrumbs | ||
}) | ||
``` | ||
|
||
When passing in your own options, you can omit any or all of these fields if you'd like to keep the default value for that field. | ||
|
||
You can also adjust where the breadcrumbs will be displayed by adjusting the [[layout]] (moving `Component.Breadcrumbs()` up or down) | ||
|
||
Want to customize it even more? | ||
|
||
- Removing breadcrumbs: delete all usages of `Component.Breadcrumbs()` from `quartz.layout.ts`. | ||
- Component: `quartz/components/Breadcrumbs.tsx` | ||
- Style: `quartz/components/styles/breadcrumbs.scss` | ||
- Script: inline at `quartz/components/Breadcrumbs.tsx` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.