Skip to content

Commit 7db2eda

Browse files
committed
run prettier
1 parent 2034b97 commit 7db2eda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1815
-1410
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug report
33
about: Something about Quartz isn't working the way you expect
4-
title: ''
4+
title: ""
55
labels: bug
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,9 +24,10 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- Device: [e.g. iPhone6]
28-
- OS: [e.g. iOS]
29-
- Browser [e.g. chrome, safari]
27+
28+
- Device: [e.g. iPhone6]
29+
- OS: [e.g. iOS]
30+
- Browser [e.g. chrome, safari]
3031

3132
**Additional context**
3233
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea or improvement for Quartz
4-
title: ''
4+
title: ""
55
labels: enhancement
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Test
1+
name: Build and Test
22

33
on:
44
push:
@@ -34,4 +34,4 @@ jobs:
3434
run: npm test
3535

3636
- name: Ensure Quartz builds
37-
run: npx quartz build
37+
run: npx quartz build

CODE_OF_CONDUCT.md

+19-22
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@ If you see someone who is making an extra effort to ensure our community is welc
2020

2121
The following behaviors are expected and requested of all community members:
2222

23-
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
24-
* Exercise consideration and respect in your speech and actions.
25-
* Attempt collaboration before conflict.
26-
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
27-
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
28-
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
23+
- Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
24+
- Exercise consideration and respect in your speech and actions.
25+
- Attempt collaboration before conflict.
26+
- Refrain from demeaning, discriminatory, or harassing behavior and speech.
27+
- Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
28+
- Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
2929

3030
## 4. Unacceptable Behavior
3131

3232
The following behaviors are considered harassment and are unacceptable within our community:
3333

34-
* Violence, threats of violence or violent language directed against another person.
35-
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
36-
* Posting or displaying sexually explicit or violent material.
37-
* Posting or threatening to post other people's personally identifying information ("doxing").
38-
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
39-
* Inappropriate photography or recording.
40-
* Inappropriate physical contact. You should have someone's consent before touching them.
41-
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
42-
* Deliberate intimidation, stalking or following (online or in person).
43-
* Advocating for, or encouraging, any of the above behavior.
44-
* Sustained disruption of community events, including talks and presentations.
34+
- Violence, threats of violence or violent language directed against another person.
35+
- Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
36+
- Posting or displaying sexually explicit or violent material.
37+
- Posting or threatening to post other people's personally identifying information ("doxing").
38+
- Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
39+
- Inappropriate photography or recording.
40+
- Inappropriate physical contact. You should have someone's consent before touching them.
41+
- Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
42+
- Deliberate intimidation, stalking or following (online or in person).
43+
- Advocating for, or encouraging, any of the above behavior.
44+
- Sustained disruption of community events, including talks and presentations.
4545

4646
## 5. Weapons Policy
4747

@@ -59,14 +59,11 @@ If a community member engages in unacceptable behavior, the community organizers
5959

6060
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. [email protected].
6161

62-
63-
6462
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
6563

6664
## 8. Addressing Grievances
6765

68-
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify @jackyzha0 with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
69-
66+
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify @jackyzha0 with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
7067

7168
## 9. Scope
7269

@@ -80,7 +77,7 @@ [email protected]
8077

8178
## 11. License and attribution
8279

83-
The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
80+
The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
8481

8582
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
8683

content/advanced/creating components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
title: Creating your own Quartz components
33
---
44

5-
See the [component listing](/tags/component) for a full-list of the Quartz built-in components.
5+
See the [component listing](/tags/component) for a full-list of the Quartz built-in components.

content/advanced/making plugins.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: Making your own plugins
55
This part of the documentation will assume you have some basic coding knowledge and will include code snippets that describe the interface of what Quartz plugins should look like.
66

77
## Transformers
8+
89
```ts
910
export type QuartzTransformerPluginInstance = {
1011
name: string
@@ -17,4 +18,4 @@ export type QuartzTransformerPluginInstance = {
1718
1819
## Filters
1920
20-
## Emitters
21+
## Emitters

content/configuration.md

+27-24
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Configuration
33
---
44

5-
Quartz is meant to be extremely configurable, even if you don't know any coding. Most of the configuration you should need can be done by just editing `quartz.config.ts`.
5+
Quartz is meant to be extremely configurable, even if you don't know any coding. Most of the configuration you should need can be done by just editing `quartz.config.ts`.
66

77
If you edit this file using a text-editor that has TypeScript language support like VSCode, it will warn you when you you've made an error in your configuration.
88

@@ -16,33 +16,35 @@ const config: QuartzConfig = {
1616
```
1717

1818
## General Configuration
19+
1920
This part of the configuration concerns anything that can affect the whole site. The following is a list breaking down all the things you can configure:
2021

2122
- `pageTitle`: used as an anchor to return to the home page. This is also used when generating the [[RSS Feed]] for your site.
2223
- `enableSPA`: whether to enable [[SPA Routing]] on your site.
2324
- `enablePopovers`: whether to enable [[popover previews]] on your site.
24-
- `analytics`: what to use for analytics on your site. Values can be
25-
- `null`: don't use analytics;
26-
- `{ provider: 'plausible' }`: use [Plausible](https://plausible.io/), a privacy-friendly alternative to Google Analytics; or
27-
- `{ provider: 'google', tagId: <your-google-tag> }`: use Google Analytics
28-
- `caononicalUrl`: sometimes called `baseURL` in other site generators. This is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical 'home' of your site lives. This is normally the deployed URL of your site (e.g. `https://quartz.jzhao.xyz/` for this site). Note that Quartz 4 will avoid using this as much as possible and use relative URLs whenever it can to make sure your site works no matter *where* you end up actually deploying it.
29-
- `ignorePatterns`: a list of [glob](https://en.wikipedia.org/wiki/Glob_(programming)) patterns that Quartz should ignore and not search through when looking for files inside the `content` folder.
25+
- `analytics`: what to use for analytics on your site. Values can be
26+
- `null`: don't use analytics;
27+
- `{ provider: 'plausible' }`: use [Plausible](https://plausible.io/), a privacy-friendly alternative to Google Analytics; or
28+
- `{ provider: 'google', tagId: <your-google-tag> }`: use Google Analytics
29+
- `caononicalUrl`: sometimes called `baseURL` in other site generators. This is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical 'home' of your site lives. This is normally the deployed URL of your site (e.g. `https://quartz.jzhao.xyz/` for this site). Note that Quartz 4 will avoid using this as much as possible and use relative URLs whenever it can to make sure your site works no matter _where_ you end up actually deploying it.
30+
- `ignorePatterns`: a list of [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) patterns that Quartz should ignore and not search through when looking for files inside the `content` folder.
3031
- `theme`: configure how the site looks.
31-
- `typography`: what fonts to use. Any font available on [Google Fonts](https://fonts.google.com/) works here.
32-
- `header`: Font to use for headers
33-
- `code`: Font for inline and block quotes.
34-
- `body`: Font for everything
35-
- `colors`: controls the theming of the site.
36-
- `light`: page background
37-
- `lightgray`: borders
38-
- `gray`: graph links, heavier borders
39-
- `darkgray`: body text
40-
- `dark`: header text and icons
41-
- `secondary`: link colour, current [[graph view|graph]] node
42-
- `tertiary`: hover states and visited [[graph view|graph]] nodes
43-
- `highlight`: internal link background, highlighted text, [[syntax highlighting|highlighted lines of code]]
32+
- `typography`: what fonts to use. Any font available on [Google Fonts](https://fonts.google.com/) works here.
33+
- `header`: Font to use for headers
34+
- `code`: Font for inline and block quotes.
35+
- `body`: Font for everything
36+
- `colors`: controls the theming of the site.
37+
- `light`: page background
38+
- `lightgray`: borders
39+
- `gray`: graph links, heavier borders
40+
- `darkgray`: body text
41+
- `dark`: header text and icons
42+
- `secondary`: link colour, current [[graph view|graph]] node
43+
- `tertiary`: hover states and visited [[graph view|graph]] nodes
44+
- `highlight`: internal link background, highlighted text, [[syntax highlighting|highlighted lines of code]]
4445

4546
## Plugins
47+
4648
You can think of Quartz plugins as a series of transformations over content.
4749

4850
![[quartz-transform-pipeline.png]]
@@ -62,18 +64,19 @@ plugins: {
6264
By adding, removing, and reordering plugins from the `tranformers`, `filters`, and `emitters` fields, you can customize the behaviour of Quartz.
6365

6466
> [!note]
65-
> Each node is modified by every transformer *in order*. Some transformers are position-sensitive so you may need to take special note of whether it needs come before or after any other particular plugins.
67+
> Each node is modified by every transformer _in order_. Some transformers are position-sensitive so you may need to take special note of whether it needs come before or after any other particular plugins.
6668
6769
Additionally, plugins may also have their own configuration settings that you can pass in. For example, the [[Latex]] plugin allows you to pass in a field specifying the `renderEngine` to choose between Katex and MathJax.
6870

6971
```ts
7072
transformers: [
71-
Plugin.FrontMatter(), // uses default options
72-
Plugin.Latex({ renderEngine: 'katex' }) // specify some options
73+
Plugin.FrontMatter(), // uses default options
74+
Plugin.Latex({ renderEngine: "katex" }), // specify some options
7375
]
7476
```
7577

7678
### Layout
77-
Certain emitters may also output [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML) files. To make sure that
79+
80+
Certain emitters may also output [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML) files. To make sure that
7881

7982
### Components

content/features/Latex.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Quartz uses [Katex](https://katex.org/) by default to typeset both inline and bl
33
## Formatting
44

55
### Block Math
6+
67
Block math can be rendered by delimiting math expression with `$$`.
78

89
```
@@ -20,20 +21,25 @@ f(x) = \int_{-\infty}^\infty
2021
$$
2122

2223
### Inline Math
24+
2325
Similarly, inline math can be rendered by delimiting math expression with a single `$`. For example, `$e^{i\pi} = -1$` produces $e^{i\pi} = -1$
2426

2527
### Escaping symbols
26-
There will be cases where you may have more than one `$` in a paragraph at once which may accidentally trigger MathJax/Katex.
28+
29+
There will be cases where you may have more than one `$` in a paragraph at once which may accidentally trigger MathJax/Katex.
2730

2831
To get around this, you can escape the dollar sign by doing `\$` instead.
2932

3033
For example:
34+
3135
- Incorrect: `I have $1 and you have $2` produces I have $1 and you have $2
3236
- Correct: `I have \$1 and you have \$2` produces I have \$1 and you have \$2
3337

3438
## MathJax
39+
3540
In `quartz.config.ts`, you can configure Quartz to use [MathJax SVG rendering](https://docs.mathjax.org/en/latest/output/svg.html) by replacing `Plugin.Latex({ renderEngine: 'katex' })` with `Plugin.Latex({ renderEngine: 'mathjax' })`
3641

3742
## Customization
43+
3844
- Removing Latex support: remove all instances of `Plugin.Latex()` from `quartz.config.ts`.
39-
- Plugin: `quartz/plugins/transformers/latex.ts`
45+
- Plugin: `quartz/plugins/transformers/latex.ts`

content/features/Mermaid diagrams.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
> [!warning]
2-
> Wondering why Mermaid diagrams may not be showing up even if you have them enabled? You may need to reorder your plugins so that `Plugin.ObsidianFlavoredMarkdown()` is *after* `Plugin.SyntaxHighlighting()`.
2+
> Wondering why Mermaid diagrams may not be showing up even if you have them enabled? You may need to reorder your plugins so that `Plugin.ObsidianFlavoredMarkdown()` is _after_ `Plugin.SyntaxHighlighting()`.
33
44
```mermaid
55
sequenceDiagram

content/features/SPA Routing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Single-page-app style rendering. This prevents flashes of unstyled content and improves smoothness of Quartz
1+
Single-page-app style rendering. This prevents flashes of unstyled content and improves smoothness of Quartz

content/features/backlinks.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
22
title: Backlinks
33
tags:
4-
- component
4+
- component
55
---
66

77
A backlink for a note is a link from another note to that note. Links in the backlink pane also feature rich [[popover previews]] if you have that feature enabled.
88

99
## Customization
10+
1011
- Removing backlinks: delete all usages of `Component.Backlinks()` from `quartz.config.ts`.
1112
- Component: `quartz/components/Backlinks.tsx`
1213
- Style: `quartz/components/styles/backlinks.scss`
13-
- Script: `quartz/components/scripts/search.inline.ts`
14+
- Script: `quartz/components/scripts/search.inline.ts`

content/features/callouts.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ title: Callouts
33
---
44

55
> [!warning]
6-
> Wondering why callouts may not be showing up even if you have them enabled? You may need to reorder your plugins so that `Plugin.ObsidianFlavoredMarkdown()` is *after* `Plugin.SyntaxHighlighting()`.
7-
6+
> Wondering why callouts may not be showing up even if you have them enabled? You may need to reorder your plugins so that `Plugin.ObsidianFlavoredMarkdown()` is _after_ `Plugin.SyntaxHighlighting()`.
87
98
> [!info]
109
> Default title
1110
1211
> [!question]+ Can callouts be nested?
12+
>
1313
> > [!todo]- Yes!, they can.
14-
> > > [!example] You can even use multiple layers of nesting.
14+
> >
15+
> > > [!example] You can even use multiple layers of nesting.
1516
1617
> [!EXAMPLE] Examples
1718
>
@@ -21,31 +22,31 @@ title: Callouts
2122
>
2223
> Aliases: note
2324
24-
> [!abstract] Summaries
25+
> [!abstract] Summaries
2526
>
2627
> Aliases: abstract, summary, tldr
2728
28-
> [!info] Info
29+
> [!info] Info
2930
>
3031
> Aliases: info, todo
3132
32-
> [!tip] Hint
33+
> [!tip] Hint
3334
>
3435
> Aliases: tip, hint, important
3536
36-
> [!success] Success
37+
> [!success] Success
3738
>
3839
> Aliases: success, check, done
3940
40-
> [!question] Question
41+
> [!question] Question
4142
>
4243
> Aliases: question, help, faq
4344
44-
> [!warning] Warning
45+
> [!warning] Warning
4546
>
4647
> Aliases: warning, caution, attention
4748
48-
> [!failure] Failure
49+
> [!failure] Failure
4950
>
5051
> Aliases: failure, fail, missing
5152

content/features/full-text search.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
---
22
title: Full-text Search
3-
tags:
4-
- component
3+
tags:
4+
- component
55
---
66

77
Full-text search in Quartz is powered by [Flexsearch](https://github.com/nextapps-de/flexsearch). It's fast enough to return search results in under 10ms for Quartzs as large as half a million words.
88

9-
It can be opened by either clicking on the search bar or pressing ⌘+K. The top 5 search results are shown on each query. Matching subterms are highlighted and the most relevant 30 words are excerpted. Clicking on a search result will navigate to that page.
9+
It can be opened by either clicking on the search bar or pressing ⌘+K. The top 5 search results are shown on each query. Matching subterms are highlighted and the most relevant 30 words are excerpted. Clicking on a search result will navigate to that page.
1010

1111
This component is also keyboard accessible: Tab and Shift+Tab will cycle forward and backward through search results and Enter will navigate to the highlighted result (first result by default).
1212

1313
> [!info]
1414
> Search requires the `ContentIndex` emitter plugin to be present in the [[configuration]].
1515
1616
### Indexing Behaviour
17+
1718
By default, it indexes every page on the site with **Markdown syntax removed**. This means link URLs for instance are not indexed.
1819

1920
It properly tokenizes Chinese, Korean, and Japenese characters and constructs separate indexes for the title and content, weighing title matches above content matches.
2021

2122
## Customization
23+
2224
- Removing search: delete all usages of `Component.Search()` from `quartz.config.ts`.
2325
- Component: `quartz/components/Search.tsx`
2426
- Style: `quartz/components/styles/search.scss`
2527
- Script: `quartz/components/scripts/search.inline.ts`
26-
- You can edit `contextWindowWords` or `numSearchResults` to suit your needs
28+
- You can edit `contextWindowWords` or `numSearchResults` to suit your needs

0 commit comments

Comments
 (0)