diff --git a/docs/Configs/Guides/Guide Dataview.md b/docs/Configs/Guides/Guide Dataview.md new file mode 100644 index 00000000..a9749764 --- /dev/null +++ b/docs/Configs/Guides/Guide Dataview.md @@ -0,0 +1,6 @@ +--- +tags: + - guide +share: true +--- +file.inlinks AS "Mentions" \ No newline at end of file diff --git a/docs/Configs/Guides/Guide Excalibrain.md b/docs/Configs/Guides/Guide Excalibrain.md new file mode 100644 index 00000000..8dacfd05 --- /dev/null +++ b/docs/Configs/Guides/Guide Excalibrain.md @@ -0,0 +1,24 @@ +--- +tags: + - guide +share: true +--- +### Ontology + +**Parents** +inception, North, origin, Parent, parent domain, parents, people, source, u, up + +**Children** +Child, children, contributes to, d, down, leads to, nurtures, South + +**Left-Side Friends** +advantages, alternatives, Friend, friends, j, Jump, Jumps, pros, similar, supports + +**Right-Side Friends** +cons, disadvantages, missing, opposes + +**Previous (Friends)** +Before, prev, Previous, w, West + +**Next (Friends)** +After, e, East, n, next \ No newline at end of file diff --git a/docs/Configs/Guides/Guide Obsidian.md b/docs/Configs/Guides/Guide Obsidian.md new file mode 100644 index 00000000..f05dbb71 --- /dev/null +++ b/docs/Configs/Guides/Guide Obsidian.md @@ -0,0 +1,49 @@ +--- +tags: + - guide +share: true +--- +[Markdown Cheatsheet](https://rentry.org/how) +# Heading 1 +## Heading 2 +### Heading 3 +#### Heading 4 +##### Heading 5 +###### Heading 6 + +## Styles + +Body +**Bold** +_Italic_ +~~Strikethrough~~ + +## Formats + +- Bullet Point +- Bullet Point + - Nested Bullet Point +1. Numbered List +2. Numbered List + 1. Nested Numbered List +- [x] Checkbox [completion:: 2024-01-01] +>Quote +>Multi line + +Break Line +___ + +## References + +Reference to a [[./index|File]] +Reference to a [[Guide Obsidian#Heading 1|Heading]] +Reference to a [[../../../2024-01-01#^025433|Paragraph]] +Inline Reference![[Guide Obsidian#Styles|Configs/Guides/Guide Obsidian > Styles]] +## Shortcuts + +Ctrl = Enable Hover Preview On Links +Alt + E = Toggle Source Mode +Ctrl + Alt + A = Emoji Toolbar +Ctrl + Alt + T = Modify Task +Drag + Ctrl + Drop = Embed / Transclude +[Multiple Cursors](https://help.obsidian.md/Editing+and+formatting/Multiple+cursors) diff --git a/docs/Configs/Guides/Guide Publisher.md b/docs/Configs/Guides/Guide Publisher.md new file mode 100644 index 00000000..32295d92 --- /dev/null +++ b/docs/Configs/Guides/Guide Publisher.md @@ -0,0 +1,286 @@ +--- +tags: + - guide +share: true +--- +## Setup + +https://squidfunk.github.io/mkdocs-material/setup/ + +## Share + +``` +share: false +path: +links: + mdlinks: false + convert: true + internals: false + nonShared: false +embed: + send: false + remove: keep + char: -%3E +attachment: + send: true + folder: +dataview: true +hardBreak: false +multipleRepo: + - owner: ThinkWithPbody + repo: TWP-Share + branch: main + autoclean: true + - owner: ThinkWithPbody + repo: TWP-Share + branch: temp + autoclean: true +copylink: + base: https://TWP-Share.github.io/TWP-Share +``` + +## mkdocs.yml + +``` +site_name: Notes by Yifu +site_description: Shared Obsidian Pages +site_url: https://thinkwithpbody.github.io/TWP-Obsidian-Share +site_author: Yifu Ding + +theme: + name: 'material' + logo: assets/meta/favicons.png + favicon: assets/meta/favicons.png + custom_dir: overrides + font: + text: Roboto + code: Roboto Mono + language: en + palette: + + # Light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: white + accent: deep purple + toggle: + icon: material/lightbulb + name: Switch to dark mode + + # Dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: black + accent: deep purple + toggle: + icon: material/lightbulb-outline + name: Switch to light mode + features: + - navigation.indexes + - navigation.top + - navigation.tabs + - navigation.tabs.sticky + - navigation.sections + - navigation.expand + - navigation.footer + - search.suggest + - search.highlight + +# Extensions +markdown_extensions: + - footnotes + - nl2br + - attr_list + - sane_lists + - meta + - smarty + - tables + - mdx_breakless_lists + - def_list + - pymdownx.arithmatex: + generic: true + - pymdownx.details + - pymdownx.magiclink + - pymdownx.critic + - pymdownx.caret + - pymdownx.keys + - pymdownx.mark + - pymdownx.tilde + - pymdownx.highlight: + use_pygments: true + anchor_linenums: true + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + - admonition + - toc: + permalink: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_code_format +plugins: + - search + - meta-descriptions + - git-revision-date-localized: + type: date + fallback_to_build_date: true + locale: en + custom_format: "%A %d %B %Y" + enable_creation_date: true + - ezlinks: + wikilinks: true + - awesome-pages + - embed_file: + callouts: true + custom-attributes: 'assets/css/custom_attributes.css' + - custom-attributes: + file: 'assets/css/custom_attributes.css' +# - tags: +# tags_file: tags.md + - encryptcontent: + title_prefix: '🔐' + summary: 'Private page' + placeholder: 'Password' + decryption_failure_message: 'Invalid password' + encryption_info_message: "You don't have access to this page." + search_index: 'encrypted' + password_button: True + password_button_text: '' + - callouts + - glightbox +hooks: + - overrides/hooks/on_page_markdown.py + - overrides/hooks/on_env.py + - overrides/hooks/on_files.py +extra_javascript: + - https://cdn.jsdelivr.net/gh/ObsidianPublisher/assets@main/dist/javascript.js + - https://polyfill.io/v3/polyfill.min.js?features=es6 + - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js +extra_css: + - https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css + - https://cdn.jsdelivr.net/gh/ObsidianPublisher/assets@main/dist/styles.css + - assets/css/admonition.css + - assets/css/custom_attributes.css + - assets/css/customization.css +extra: + SEO: assets/meta/SEO.png + comments: False #disable comments globally + generate_graph: True #generate the graph of the site + attachments: 'assets/img' #path to the folder where the attachments are stored + no-auto-h1: True #disable the automatic generation of h1 if no h1 is found + blog_list: + pagination: true #enable pagination + pagination_message: true #display the message "Showing x posts out of y" + pagination_translation: 'posts in' #message to display before the number of posts ; Add your own translation! + no_page_found: "No pages found!" #message to display when no pages are found ; Add your own translation! + hooks: + strip_comments: true + fix_heading: true + social: + - icon: fontawesome/brands/instagram + link: https://www.instagram.com/yifu_ding_/ + - icon: fontawesome/brands/linkedin + link: https://www.linkedin.com/in/yifu-ding/ +copyright: Copyright © 2024 Yifu Ding +``` + + +## Settings + +``` +{ + "github": { + "branch": "main", + "automaticallyMergePR": true, + "dryRun": { + "enable": false, + "folderName": "github-publisher" + }, + "tokenPath": "%configDir%/plugins/%pluginID%/env", + "api": { + "tiersForApi": "Github Free/Pro/Team (default)", + "hostname": "" + }, + "workflow": { + "commitMessage": "[PUBLISHER] Merge", + "name": "" + }, + "verifiedRepo": true + }, + "upload": { + "behavior": "obsidian", + "defaultName": "docs", + "rootFolder": "", + "yamlFolderKey": "", + "frontmatterTitle": { + "enable": false, + "key": "title" + }, + "replaceTitle": [], + "replacePath": [], + "autoclean": { + "enable": true, + "excluded": [] + }, + "folderNote": { + "enable": true, + "rename": "index.md", + "addTitle": { + "enable": false, + "key": "title" + } + }, + "metadataExtractorPath": "" + }, + "conversion": { + "hardbreak": false, + "dataview": true, + "censorText": [], + "tags": { + "inline": true, + "exclude": [], + "fields": [] + }, + "links": { + "internal": true, + "unshared": true, + "wiki": false, + "slugify": true + } + }, + "embed": { + "attachments": true, + "overrideAttachments": [], + "keySendFile": [], + "notes": true, + "folder": "", + "convertEmbedToLinks": "keep", + "charConvert": "->", + "useObsidianFolder": true + }, + "plugin": { + "shareKey": "share", + "excludedFolder": [ + "Configs/Templater", + "Family" + ], + "copyLink": { + "enable": true, + "links": "", + "removePart": [], + "transform": { + "toUri": true, + "slugify": "lower", + "applyRegex": [] + } + }, + "setFrontmatterKey": "Set" + } +} +``` \ No newline at end of file diff --git a/docs/Configs/Guides/Guide Tasks.md b/docs/Configs/Guides/Guide Tasks.md new file mode 100644 index 00000000..e1a0a030 --- /dev/null +++ b/docs/Configs/Guides/Guide Tasks.md @@ -0,0 +1,9 @@ +--- +tags: + - guide +share: true +--- +[Guide](https://publish.obsidian.md/tasks/Introduction) + +[Filters](https://publish.obsidian.md/tasks/Queries/Filters) +[RegEx](https://publish.obsidian.md/tasks/Queries/Regular+Expressions) \ No newline at end of file diff --git a/docs/Configs/Guides/Guide Templater.md b/docs/Configs/Guides/Guide Templater.md new file mode 100644 index 00000000..f7c3ec1c --- /dev/null +++ b/docs/Configs/Guides/Guide Templater.md @@ -0,0 +1,29 @@ +--- +tags: + - guide +share: true +--- +<%* +const fileName = "This is the name of a file"; +const existing = tp.file.find_tfile(fileName); +let createdFileDisplay; +if (existing) { + createdFileDisplay = existing.basename; +} else { + createdFileDisplay = (await tp.file.create_new(tp.file.find_tfile("template-name"), fileName)).basename; +} +_%> +[[<% createdFileDisplay %>|<% createdFileDisplay %>]] +<% tp.file.cursor() %> + +## Date + +[Date Module](https://silentvoid13.github.io/Templater/internal-functions/internal-modules/date-module.html) +[ISO 8601 Durations](https://en.wikipedia.org/wiki/ISO_8601#Durations) +[moment.js String Format](https://momentjs.com/docs/#/parsing/string-format/) + +## Examples + +[Templates Showcase](https://github.com/SilentVoid13/Templater/discussions/categories/templates-showcase) +[zachyoung Templater snippets](https://zachyoung.dev/posts/templater-snippets) +[Christian's Templater Templates](https://github.com/chhoumann/Templater_Templates) diff --git a/docs/Configs/Guides/index.md b/docs/Configs/Guides/index.md new file mode 100644 index 00000000..8abc092e --- /dev/null +++ b/docs/Configs/Guides/index.md @@ -0,0 +1,23 @@ +--- +tags: + - navigation + - guide +parents: "[[index]]" +share: true +--- +[[./Guide Obsidian|Obsidian]] +[[./Guide Templater|Templater]] +[[./Guide Dataview|Dataview]] +[[./Guide Tasks|Tasks]] +[[./Guide Excalibrain|Excalibrain]] +[[./Guide Publisher|Publisher]] + +%% +- [[./Guide Dataview|Guide Dataview]] +- [[./Guide Excalibrain|Guide Excalibrain]] +- [[./Guide Obsidian|Guide Obsidian]] +- [[./Guide Publisher|Guide Publisher]] +- [[./Guide Tasks|Guide Tasks]] +- [[./Guide Templater|Guide Templater]] + +%% \ No newline at end of file diff --git a/docs/Courses/ARC1046H Structures 1/Attachments/2024-03-05T15_12_48-05_00_TWP-X570-WIN10(vlc).jpg b/docs/Courses/ARC1046H Structures 1/Attachments/2024-03-05T15_12_48-05_00_TWP-X570-WIN10(vlc).jpg new file mode 100644 index 00000000..d35af80b Binary files /dev/null and b/docs/Courses/ARC1046H Structures 1/Attachments/2024-03-05T15_12_48-05_00_TWP-X570-WIN10(vlc).jpg differ diff --git a/docs/Courses/ARC1046H Structures 1/Attachments/2024-03-05T16_07_18-05_00_TWP-X570-WIN10(vlc).jpg b/docs/Courses/ARC1046H Structures 1/Attachments/2024-03-05T16_07_18-05_00_TWP-X570-WIN10(vlc).jpg new file mode 100644 index 00000000..c5624f98 Binary files /dev/null and b/docs/Courses/ARC1046H Structures 1/Attachments/2024-03-05T16_07_18-05_00_TWP-X570-WIN10(vlc).jpg differ diff --git a/docs/Courses/ARC1046H Structures 1/Attachments/ARC1046H Structures 1 2024-01-17.png b/docs/Courses/ARC1046H Structures 1/Attachments/ARC1046H Structures 1 2024-01-17.png new file mode 100644 index 00000000..adaa6365 Binary files /dev/null and b/docs/Courses/ARC1046H Structures 1/Attachments/ARC1046H Structures 1 2024-01-17.png differ diff --git a/docs/Courses/ARC1046H Structures 1/Attachments/ARC1046H Structures 1 2024-01-24.png b/docs/Courses/ARC1046H Structures 1/Attachments/ARC1046H Structures 1 2024-01-24.png new file mode 100644 index 00000000..ac570ef1 Binary files /dev/null and b/docs/Courses/ARC1046H Structures 1/Attachments/ARC1046H Structures 1 2024-01-24.png differ diff --git a/docs/Courses/ARC1046H Structures 1/Attachments/Assignment 02-6.jpg b/docs/Courses/ARC1046H Structures 1/Attachments/Assignment 02-6.jpg new file mode 100644 index 00000000..4a153461 Binary files /dev/null and b/docs/Courses/ARC1046H Structures 1/Attachments/Assignment 02-6.jpg differ diff --git a/docs/Courses/ARC1046H Structures 1/Attachments/Pasted image 20240401222128.png b/docs/Courses/ARC1046H Structures 1/Attachments/Pasted image 20240401222128.png new file mode 100644 index 00000000..1de1dbf3 Binary files /dev/null and b/docs/Courses/ARC1046H Structures 1/Attachments/Pasted image 20240401222128.png differ diff --git a/docs/Courses/ARC1046H Structures 1/index.md b/docs/Courses/ARC1046H Structures 1/index.md new file mode 100644 index 00000000..4464ab8c --- /dev/null +++ b/docs/Courses/ARC1046H Structures 1/index.md @@ -0,0 +1,613 @@ +--- +tags: + - course +year: 2024 +quarter: "1" +people: + - "[[People/Dave Bowick|People/Dave Bowick]]" + - "[[People/Shannon Hilchie|People/Shannon Hilchie]]" +location: DA 200 +weekday: 3 +time: 09:00:00 +share: true +--- +## Course Brief + +[code:: ARC1046H] +[title:: Structures 1] + +[ARC1046HS 2024 2024.01.08 Graduate Course Outline.pdf](file:///D:%5COneDrive%20-%20University%20of%20Toronto%5C_twp%5CDocument%5CScholar%5CUTOR%5C2024-01%5CARC1046H%5CARC1046HS%202024%202024.01.08%20Graduate%20Course%20Outline.pdf) +[Files](file:///D:%5COneDrive%20-%20University%20of%20Toronto%5C_twp%5CDocument%5CScholar%5CUTOR%5C2024-01%5CARC1046H%5CFiles) + +## Sizing Guidelines + +| Material | Type | Standard Sizes | Rule of Thumb | Note | +| -------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------- | +| Steel | Deck Corrugated Metal | d: **38**, 76mm | d = l / 50 | | +| Steel | Deck Concrete on Corrugated Metal | d: **38**, 76 mm + **64** mm | d = l / 20 | Concrete is usually normal density | +| Steel | Joists Open Web Steel | d: n * **50** mm (2") | d = l / 16 | | +| Steel | Purlins | [[index#Standard Steel Sizes|Standard Steel Sizes]] | d = l / 25; b = d / 2-3 | | +| Steel | Beams | [[index#Standard Steel Sizes|Standard Steel Sizes]] | d = l / 20; b = d / 2-3 | | +| Steel | Girders | [[index#Standard Steel Sizes|Standard Steel Sizes]] | d = l / 15; b = d / 2-3 | | +| Steel | Trusses | d: n * **50** mm | d = l / 12; b = d / 2-3 | | +| Steel | Columns | [[index#Standard Steel Sizes|Standard Steel Sizes]] | w = h / **20**-40 | | +| Wood | Deck Plywood | c/c: 12, **16**, 20, 24; Subfloors: 6.4, 9.5 mm (1/4, 3/8"); Walls: **12.7**, 15.9, 19.1, 22.2, 25.4 mm (**1/2**, 5/8, 3/4, 7/8, 1"); Roof: **12.7** mm (**1/2**"); Floors: **19.1** mm (**3/4**") | | 4'x8' sheets | +| Wood | Deck Tongue and Groove | d: **38**, 64, 89 mm | d = l / 40 | Standard size matches wood joists | +| Wood | Joists Lumber | w: **38**, 89 mm; d: 89, 140, **184**, 235, 286 mm | d = l / 16 | 16"/400mm c/c | +| Wood | Joists Engineered I- | d: 240, 302, 356, 406 mm | d = l / 18 | | +| Wood | Beams Lumber | | d = l / 14; b = d / 2-3 | | +| Wood | Beams Engineered | | d = l / 16; b = d / 2-3 | | +| Wood | Girders Engineered | | d = l / 12; b = d / 2-3 | | +| Wood | Columns & Posts | w: 38, 64, **89** mm | w = h / 30 | | +| Wood | Parallel Strand Lumber | w: 68, 89, 133, 178 mm; d: 241, 302, 356, 406, 457 mm; l: < 20 m | | Long span | +| Wood | Laminated Veneer Lumber | w: 19 < **45** < 178 mm; d: 241, 302, 356, 406, 476, 606 mm; l: < 24.4 m | | Long span | +| Wood | Cross Laminated Timber | w: 2-10'; l: < 60'; d: < 20" | | Replaces Joists Deck / Studs Plywood Shear Wall | +| Concrete | Slab Pre-cast Hollowcore | d: 150, **200**, **250**, **300**, 350 mm | d = l / 40 | | +| Concrete | Slab One-way | d: n * **50** mm | d = l / 18 | | +| Concrete | Slab Two-way | d: 150, **200**, **250**, **300**, 350 mm | d = l / 30 | Load is shared on all sides as long as ratio < 2:1 | +| Concrete | Beams | d: n * **50** mm | d = l / 16; b = d / 2-3 | | +| Concrete | Girders | d: n * **50** mm | d = l / 12; b = d / 2-3 | | +| Concrete | Columns | d: n * **50** mm | w = h / 20 | | +| Concrete | Walls | d: n * **50** > 200 mm | w = h / 25 | | +| Masonry | Walls Load Bearing | w: **190**, 240, 290 mm | w = h / 20 | If brick, there will be more than one wythe | +| Masonry | Walls Non-Load Bearing Partitions | w: **190**, 240, 290 mm | w = h / 36 | | +| Masonry | Veneer Brick | h: **11** m starting at grade, shelf angles **storey to storey** | | Laterally connected to the building with **ties** at **600** mm c/c | + +## Standard Steel Sizes + +### W Sections +- W100 +- W150 +- W200 +- W250 +- W310 +- W360 +- W410 +- W460 +- W530 +- W610 +- W690 +- W760 +- W840 +- W920 +- W1000 +- W1100 + +### Channels +- C75 +- C100 +- C130 +- C150 +- C180 +- C200 +- C230 +- C250 +- C310 +- C380 + +### Square / Rectangle +- HSS76x +- HSS89x +- HSS102x +- HSS114x +- HSS152x +- HSS178x +- HSS203x +- HSS254x +- HSS306x +- HSS356x + +Example: HSS152x102 + +### Round +- HSS76ø +- HSS89ø +- HSS102ø +- HSS114ø +- HSS127ø +- HSS141ø +- HSS152ø +- HSS168ø +- HSS178ø +- HSS219ø +- HSS273ø +- HSS324ø +- HSS356ø + +## Bearing Capacity + +To achieve bearing capacity: +- Soil must be undisturbed +- No organic materials +- Excavations cleaned by hand (if you have to pick it up by hand, it goes) + +Bearing Capacity must be greater than Bearing Pressure (Bf) +Br > Bf +Bf = Pf "Factored Loads" / A (m^2) "Area of Bearing" + +| Type and Condition of Soil or Rock | Maximum Allowable Bearing Pressure (kPa (kN / m^2)) | +| ---- | ---- | +| Dense or Compact Sand or Gravel | 150 | +| Loose Sand or Gravel | 50 | +| Dense or Compact Silt | 100 | +| Stiff Clay | 150 | +| Firm Clay | 75 | +| Soft Clay | 40 | +| Till | 200 | +| Clay Shale | 300 | +| Sound Rock | 500 | +Typical slab on grade: Br > 24 kPa + +## Modules + +### Module 1 + +[ARC1046 Lecture 01 Strength, Stiffness, Stability.pptx](file:///D:%5COneDrive%20-%20University%20of%20Toronto%5C_twp%5CDocument%5CScholar%5CUTOR%5C2024-01%5CARC1046H%5CLecture%20Slides%5CARC1046%20Lecture%2001%20Strength,%20Stiffness,%20Stability.pptx) +[Videos](https://www.archdaily.com/797373/these-videos-will-help-you-pass-your-are-structural-exam) + +Safe, stable building that is the cheapest possible, while meeting constraints, needs, demands, [[Wiki/NBCC/NBCC|Wiki/NBCC/NBCC]] +Engineers working iteratively with Architects + +- [x] Buy reading: Science Builders Structural Engineering [completion:: 2024-04-09] + +Structural engineering considers [[index#Strength|Strength]], [[index#Structure|Structure]], [[index#Stiffness|Stiffness]], [[index#Stability|Stability]]. + +#### Structure +#### Strength +The amount of load a structure can sustain prior to failure. + +Load on the system has to be less than the load capacity of the system that sustains load. +##### Load factor + +**Factor of safety** of 2: the system can sustain twice the load expected. + +Pf: factor of load +Vf: factor of shear +Mf: factor of moment +Tf: + +##### Capacity reduced + +Pr: resistance of load +Vr: resistance of shear +Mr: resistance of moment + +##### Types of forces +###### Compression +Always a secondary factor resulting tension failure. +###### Tension +###### Shear +V.F *kN* +On concrete, it’s a tension failure on the diagonal. +*Concrete Punching Shear* +###### Bending +Compression and Tension acting on either sides, a tension failure on the tension side. +Steel beam fails by yielding both in compression and tension. +###### Torsion +Shear around the perimeter. +###### Moment +M.F *kNm* +Distance moved * force = 1 kNm = 1,000,000 Nmm +###### Connection Failures +- Screws shearing, bending. +- Plate in tension. +- Anchor pullout + +#### Stiffness +The amount of force required to make a structure deflect by some fixed increment. +Represented by symbol **K**. +Flexibility is the amount that a structure will deflect or rotate under a fixed amount of load. + +**Guidelines** +- Comfort +- Preservation of Finishes +- Stability +- Drainage +- Interface with Building Elements + +**Serviceability Limit** +[SERVICEABILITY LIMITS.pdf](file:///D:%5COneDrive%20-%20University%20of%20Toronto%5C_twp%5CDocument%5CScholar%5CUTOR%5C2024-01%5CARC1046H%5CFiles%5CReadings%5CSERVICEABILITY%20LIMITS.pdf) + +**Vertical** +- Live: L/360 +- Total: L/240 + +**Horizontal** +- H/500 + +**Rotational** + +**Soil** +Differential settlement + +**Vibration** +Continuous vibrations +- 2.5 Hz + +Transient vibrations +- Heel drop +- Load is damped by mass of building and +- Limit the acceleration to 1% of gravity + +Amplified vibrations (resonance) + + +#### Stability +The state of being stable, or the opposite of in-stable. Instability can be elastic, ponding, tipping, or sliding. + +**Sliding** +- Resistance by friction + +**Tipping** + +**Elastic** +- Stable + - Columns converge on a limit visually straight +- Unstable + - Not stiff enough causing more and more elastic instability + +**Ponding** +- Stable +- Unstable + - More sagging allows accumulation of more water causing more sagging + +**No load path** + +**Buckling** +- **Overall** +- **Lateral torsional** +- **Local** + - Instability resulting from a compressive load + +### Module 2 + +![[./Attachments/Assignment 02-6.jpg|Assignment 02-6]] + +Structural drawing +one should be able to build the entire structure from structural drawings +- Grid identification +- Grid dimensions +- Labels +- Sizing +- Framing +- Gravity system +- Lateral Load resisting system (LLRS) +- Cantilevers + + +- Steel + - Single line on plans +- Wood + - Wavy line hatch in plan + - Cross in section +- Open web steel joist (generic truss, not typically what we refer to when we say truss) + +Steel and concrete building: +- Foundation and basement plan + - Plans are drawn: + - mostly cut above and look down + - More standard practice + - Doesn’t necessarily make sense because it’s more useful to see the beams supporting floors than this floor + - Cut below and look up + - Like a reflected ceiling plan (used to be the standard practice in 70s, now replaced by more rigorous standards) + - Note elevations on drawing + - Elevations of slabs typically noted + - Depths (pits) are referenced locally, relative to the drawing + - Cardinal vs Ordinal + - Cardinal + - North South West East + - Ordinal + - Contextual + - Right + - Left + - Geo datum as cardinal, others as ordinal + - Put the grids in the most convenient place to offset from foundations + - [x] ![[./Attachments/ARC1046H Structures 1 2024-01-17.png|ARC1046H Structures 1 2024-01-17]]%%[[../../../ARC1046H Structures 1 2024-01-17|🖋 Edit in Excalidraw]]%% [completion:: 2024-04-10] + - Only describe the extent when it’s not obvious + - Describe top of steel / beam everywhere (sometimes indicated on schedule) + - sometimes, indicate under side of deck, and top of steel is at underside of deck unless noted + - Don’t detail the connections unless it’s special + - Horizontal or vertical text for horizontal or vertical elements + - 45 degrees for elements going in and out of the page + - Show the information in the first and most useful place to show for the contractor + - show information on footing and column schedule when there’s no space + - Factor loads + - Service level loads for foundations (to estimate settlement) + - If it’s not in the price, it’s not in the contract; don’t bury scope, are sure every piece is in the price making the project easier to build + - Describe as much scope as you can in plan + - Most things in sections + - Half in details + +Concrete buildings: +- Grids start from outer edge of slab, and interior columns are still centered on grids +- Working steel (load bearing) in one direction, nominal or non-working steel in the other for temperature changes +- Pour a diamond on slab on grade to prevent reentering corner (inverted, inside corner) from forming cracks in concrete where it connects + +Tributary area: +- Beams: + - Purlin + - Joist + - Beam + - Girder +- Tributary width typically equals span +- Tributary area = tributary width * length + +### Module 3 + +[Slides](https://utoronto-my.sharepoint.com/:p:/r/personal/yifu_ding_mail_utoronto_ca/Documents/_twp/Document/Scholar/UTOR/2024-01/ARC1046H/Lecture%20Slides/ARC1046+Lecture+03+Intro+to+Steel+Construction.pptx?d=wacce4b650e3945dc8902a53e8a0791ce&csf=1&web=1&e=IwSQ5U) + +Types of construction +- Structural Steel +- Reinforced Concrete +- Wood (Nominal Lumber) +- Mass Timber +- Precast Concrete +- Load Bearing Masonry (with Steel/Wood Frame/Concrete) + +Alternative Construction Techniques (Glass, Fabric, Straw Bale, Rammed Earth) + +- Roof system: + - Support environmental loads (and possibly Occupant Loads + - Slope to drains + - Possibly integral to fire separation + - Support the building envelope (insulation and roofing) + - Diaphragm action (keep a building square in plan) + - Transfer Loads to vertical supports (Walls, Columns) +- Floor system: + - Support occupant loads  + - Transfer Loads to vertical supports (Walls, Columns) + - To provide the concrete wearing surface or the base for special finishes or coverings. + - Diaphragm action (keep a building square in plan) + - Possibly integral to fire separation +- Columns and walls + - Reinforced Concrete Columns and Walls + - Concrete Block, Brick or Stone Masonry + - Structural Steel Columns + - Wood Stud Bearing Walls + - Light Gauge Steel Bearing Walls + - Roles + - Transfer the gravity loads (dead and live) from the floor or roof to the foundation.  + - Cladding Support + - Wind loads +- Compression elements roles burdens + - Not to squash under load + - Not to buckle under load + - Not to deflect excessively + - Possibly: not to bend under wind load + - Possibly: be part of the LLRS +- Guidelines for designing the Supporting System + - Regular layout + - Make use of architectural elements + - Load lateral load resisting elements + - Repetition + - Multiple storey column lifts (steel) + - Minimize transfers +- Cold and hot rolled steel + - [x] ![[./Attachments/ARC1046H Structures 1 2024-01-24.png|ARC1046H Structures 1 2024-01-24]]%%[[../../../ARC1046H Structures 1 2024-01-24|🖋 Edit in Excalidraw]]%% [completion:: 2024-04-10] + - Flange thickness and web thickness not necessarily same width, not working as hard as flange + +Steel construction +- Always intumescent paint for exposed steel for fireproof +- Used for shorter buildings because building wood concrete form is expensive of not reused +- Used for very tall buildings because they are lighter +- Sizing guidelines + - General + - d = l / 20 + - w = h / 25 + - Corrugated metal deck + - Standard depth: d = 38mm + - d = l / 50 + - Concrete slab metal deck + - d = 38 or 76mm + concrete + - d = l / 20 + - Open web steel joist OWSJ + - 50mm increments + - d = l / 16 + - Steel beams + - Purlins d = l / 25 + - Beans d = l / 20 + - Girders d = l / 15 + - Beam width b = d / 2.5, 2-3 (very rough estimate) + - Trusses + - 50mm increments + - d = l / 12 + - Columns + - Standard sizes listed in CISC steel handbook + - w = h / 20-40 (20 towards heavy loads, 40 towards slenderness) + - Cantilever + - Half of regular rule of thumb + +Steel is deepest or longest because it’s strongest +Concrete is the shallowest system because it’s weak +The structural system with the least expensive deck is the least expensive system because there is more deck than anything else +Deeper is cheaper + +HSS: hollow steel section + +Transfer: load taken to the nearest possible columns + +### Module 4 + +- [x] Share answer with Tim [due:: 2024-02-06] [completion:: 2024-02-07] + +### Module 5 + +Footing Thickness = MAX(Footing Projection, 200mm) + +Caisson and Belled Caisson in Edminton +### Module 6 + +**Types of Loads** +- D = Dead Load - Permanent +- L = Live Load - Variable +- S = Snow Load - Variable +- W = Wind Load - Variable +- E = Earthquake Load - Rare +- T = Temperature, shrinkage, moisture, settlement, or combination +- H = Lateral Soil Loads (including ground water) - Permanent +- P = Prestress - Permanent + +**Assembly** +4.8 kPa +2.4 kPa Fixed Seat or Restaurants < 100 m^2 + +**Non-Assembly Area** +4.8 kPa Ground Floor +2.4 kPa Remaining Floors + +**Residential Live Loads** +1.9 kPa + +**Vehicles** +2.4 kPa Parking Garages (Cars) +6.0 kPa Parking Garages (Buses, Light Trucks) +12.0 kPa Parking Garages (Trucks) +12.0 kPa Driveways and Sidewalk Areaways and Basements + +**Live Load Reduction Factor LLRF** +Non-Assembly Areas, Load == Any other than Assembly, Tributary Area > 20 m^2: +0.3 + ROOT(9.8 / A) +Assembly Areas OR Loads >= 4.8 kPa, Tributary Area > 80 m^2: +0.5 + ROOT(20 / A) + +### Module 7 + +Earth Pressure at level h p (kPa)= Earth Pressure Coefficient k (0.25) * Surcharge q (4.8 or 12 kPa) + k * Weight of the Soil y (20 kN/m^3) * Depth Below Grade h (m) + +Vibration resonance and amplification + +Limit state design +ULS: Ultimate Limit State +SLS: Serviceability Limit State + +ULS: Strength +![[./Attachments/2024-03-05T15_12_48-05_00_TWP-X570-WIN10(vlc).jpg|2024-03-05T15_12_48-05_00_TWP-X570-WIN10(vlc)]] + +SLS: Serviceability +Stiffness, Deflection + +Use SLS Snow Load Importance Factor +![[./Attachments/2024-03-05T16_07_18-05_00_TWP-X570-WIN10(vlc).jpg|2024-03-05T16_07_18-05_00_TWP-X570-WIN10(vlc)]] + +### Module 8 + +Static: Not moving + +| Title | Here | What | +| ---- | ---- | ---- | +| -4.4588 | 4.0147 | | +| 1.6126 | 4.2011 | | +| 8.8082 | 3.5587 | | +| | | | +| 5.962 | 11.7745 | | +| | | | + +### Module 9 + +6 Degrees of Freedom: +- Translation XYZ +- Rotation XYZ + +Sum of Forces for each 2D Plane: +- Fx Translation Horizontal +- Fy Translation Vertical +- M Rotation + +Connections: +- Pin +- Roller +- Moment +- Any combination of above 3 + +UDL: Uniform Distributed Load + +Teeter-Totter + +M1 = P1 * e1 = 0.65 kN * 0.8 m = 0.52 kNm + +### Module 10 + +For P applied right in the middle of beam: +R = 1/2 P kN +V: kN +M: kNm + +MoS @ X = 0 - 1/2 L: +V = 1/2 P +M = 1/2 PX + +MoS @ X = 1/2L - L: +V = -1/2 P +M = -1/2 PX + 1/2 PL = 1/2 P (L - X) + +--- + +Mos @ X = 0: +V = 1/2 P +M = 0 + +Mos @ 1/4 L: +V = 1/2 P +M = 1/8 PL + +Mos @ 3/4 L: +V = -1/2 P +M = 1/8 PL + +![[./Attachments/Pasted image 20240401222128.png|Pasted image 20240401222128]] + +--- + +**Analogous Point Load Free Body Diagram (APL):** +Representing distributed loads (UDL) as an equivalent point load can help simplify the diagram. It will have the same effect on the equilibrium of the Free Body Diagram (FBD) (so also the reactions). But not the TOTAL shear and bending moment diagram. + +--- + +For W (kN/m) applied uniformly on the beam: +P = WL kN +R.1,2 = 1/2 WL kN +V: kN +M: kNm + +MoS @ X = 0 - L: +V = 1/2 WL - WX = W (1/2 L - X) +M = 1/2 WLX - 1/2 WX^2 = 1/2 WX (L - X) + +--- + +Mos @ X = 0: +V = 1/2 WL +M = 0 + +Mos @ 1/2 L: +V = 0 +M = 1/8 WL^2 + +Mos @ 3/4 L: +V = -1/4 WL +M = 3/32 WL^2 + +Mos @ L: +V = -1/2 WL +M = 0 + +### Module 11 + +### Module 12 + + +## Projects + +### [[Projects/Structures 1 - Project 1/Structures 1 - Project 1|Project 1]] + +- [x] [ARC1046 Project Description.pdf](file:///D:%5COneDrive%20-%20University%20of%20Toronto%5C_twp%5CDocument%5CScholar%5CUTOR%5C2024-01%5CARC1046H%5CAssignments%5CARC1046%20Project%20Description.pdf) [due:: 2024-04-30] [completion:: 2024-04-18] +[ARC1046 Project Drawings.pdf](file:///D:%5COneDrive%20-%20University%20of%20Toronto%5C_twp%5CDocument%5CScholar%5CUTOR%5C2024-01%5CARC1046H%5CAssignments%5CARC1046%20Project%20Drawings.pdf) +[ARC1046 Project Part 01 Quick Example.pdf](file:///D:%5COneDrive%20-%20University%20of%20Toronto%5C_twp%5CDocument%5CScholar%5CUTOR%5C2024-01%5CARC1046H%5CAssignments%5CARC1046%20Project%20Part%2001%20Quick%20Example.pdf) + + + +### [[Projects/Structures 1 - Project 2/Structures 1 - Project 2|Project 2]] + +### [[Projects/Structures 1 - Project 3|Project 3]] + +### [[Projects/Structures 1 - Project 4|Project 4]] diff --git a/docs/Wiki/Attachments/Escape From Tarkov/Pasted image 20240520011534.png b/docs/Wiki/Attachments/Escape From Tarkov/Pasted image 20240520011534.png new file mode 100644 index 00000000..3e9c6a8e Binary files /dev/null and b/docs/Wiki/Attachments/Escape From Tarkov/Pasted image 20240520011534.png differ diff --git a/docs/Wiki/Attachments/Peer 3D Printing Service/2024-04-10T00_15_05.jpg b/docs/Wiki/Attachments/Peer 3D Printing Service/2024-04-10T00_15_05.jpg new file mode 100644 index 00000000..de91f520 Binary files /dev/null and b/docs/Wiki/Attachments/Peer 3D Printing Service/2024-04-10T00_15_05.jpg differ diff --git a/docs/Wiki/Attachments/Peer 3D Printing Service/2024-04-10T21_01_21-05_00_TWP-X570-WIN10(Rhino).gif b/docs/Wiki/Attachments/Peer 3D Printing Service/2024-04-10T21_01_21-05_00_TWP-X570-WIN10(Rhino).gif new file mode 100644 index 00000000..66963de2 Binary files /dev/null and b/docs/Wiki/Attachments/Peer 3D Printing Service/2024-04-10T21_01_21-05_00_TWP-X570-WIN10(Rhino).gif differ diff --git a/docs/Wiki/Attachments/Peer 3D Printing Service/Showcase-Arjay Asuncion.jpg b/docs/Wiki/Attachments/Peer 3D Printing Service/Showcase-Arjay Asuncion.jpg new file mode 100644 index 00000000..17c0263c Binary files /dev/null and b/docs/Wiki/Attachments/Peer 3D Printing Service/Showcase-Arjay Asuncion.jpg differ diff --git a/docs/Wiki/Escape From Tarkov.md b/docs/Wiki/Escape From Tarkov.md new file mode 100644 index 00000000..4b29d4bb --- /dev/null +++ b/docs/Wiki/Escape From Tarkov.md @@ -0,0 +1,180 @@ +--- +tags: + - wiki +share: true +--- +parents:: [[../../2024-04-26|2024-04-26]] + +# Escape From Tarkov +## SPT Install and Update + +1. Use BsgLauncher.exe to install or update official EFT to your best SSD +2. Download SPT AKI automated installer [here](https://sp-tarkov.com/#download) +3. Install SPT files in a separate folder affixed with version number +4. Install this [[Escape From Tarkov#SPT Modlist|SPT Modlist]] +%% - When updating to minor versions without making changes to the modlist, just copy over the old files to the new location. + - Game Settings: "/user/sptSettings" + - Launcher settings: "/user/launcher" + - Mods: "/user/mods" & "/BepInEx/plugins" + **Never delete or replace "/BepInEx/plugins/spt".** + - Mod Settings: "/BepInEx/config" + - Save Profiles (only if you run a server): "/user/profiles" + ![|500](https://live.staticflickr.com/65535/53696801218_db324e3ae4_o.jpg)%% + +## SPT Modlist + +The modlist is compatible with **Mod Organizer** for profile management, meaning more than one instance of the game can be stored without taking excessive disk space, but it is not mandatory. + +Manual install locations are marked with 🍌 for **"/BepInEx/plugins"** and 🥒 for **"/user/mods"**. + +##### Mod Organizer 2 +1. Download and install [MO2](https://github.com/ModOrganizer2/modorganizer/releases). + - Download and install [SPT ModOrganizer Integration](https://hub.sp-tarkov.com/files/file/1314-spt-modorganizer-integration/#overview) by extracting it to the MO install location. +2. Create a new global instance in your SPT folder. Settings can be kept default, ignore pop-ups. + - Under SPT root, edit `sptvfsbridge.bat` and add `REM ` at the start of line 9 and 12 so that it reads for example `REM start "" "%server_path%"`, then save the file. This is so that only the client will run, and instantly. +3. Download and install any mods in MO, making sure to select their full name from the drop down. To speed up the process, you can extract mod files to the MO instance location under `MO\\mods\`, then refresh MO. + ![2024-06-04T22_27_17-05_00_TWP-X570-WIN10(Obsidian).jpg](file:///D:%5C_twp%5CMedia%5CImage%5CPictures%5CShareX%5C2024%5C2024-06%5C2024-06-04T22_27_17-05_00_TWP-X570-WIN10(Obsidian).jpg) + - **Packages** are named `SPT Salt _`. They contain all mods of a major version. + - **Patches** are named `SPT Salt _.`. They are smaller and incomplete, meant to distribute mod updates quickly. + - The **PersistentFiles** mod is how default configs are distributed and is a placeholder for your SPT settings and profile. Simply copy the files in this mod from `MO\\mods\PersistentFiles-*\` as well as any extra files you want to keep from `MO\\overwrite\` into an archive, then install it in MO as a mod set to a high priority to keep files across updates. +4. **Profiles & Categories** are named `SPT Salt MO _.` They are the fastest way to switch between mod lists, but they only work if you've already imported all mods they reference, so don't skip the previous step. Extract the archive to `MO2\\`, then refresh MO and select the profile. +5. Click `Run` to launch SPT. + - Change SPT Launcher settings on Game Path and URL. + +![[./Attachments/Escape From Tarkov/Pasted image 20240520011534.png|500]] + +##### Packages (Manual) +To install, remove existing 🍌 and 🥒 folders completely and place all contents from the package in root **"/"**. + +##### Patches (Manual) +To install, place all contents from the patch in root **"/"**. + +> [!warning] +> **Never delete or replace "/BepInEx/plugins/spt".** + +## Project Fika (MPT) + +To join my Fika server, run Aki.Launcher.exe and in "Settings", change URL to `http://173.32.64.239:6969`. +To join local server, change URL back to `http://127.0.0.1:6969`. + +> [!tip] +> If you want to use your own profile on our server or download the one in use on our server for your local server, contact me. + +### Modlist +#### Tools +[Server Value Modifier](https://hub.sp-tarkov.com/files/file/379-server-value-modifier-svm/#tab_d24083dde670a53728f69fa322aa580ec032191a) 🥒 (Server settings) +[Profile Editor](https://hub.sp-tarkov.com/files/file/184-spt-aki-profile-editor/) (Read installation, player health, quest, and items) + +#### Bots +[SWAG + DONUTS](https://hub.sp-tarkov.com/files/file/878-swag-donuts-dynamic-spawn-waves-and-custom-spawn-points/) 🍌🥒 +[SAIN](https://hub.sp-tarkov.com/files/file/1062-sain-2-0-solarint-s-ai-modifications-full-ai-combat-system-replacement/) 🍌🥒 +[Big Brain](https://hub.sp-tarkov.com/files/file/1219-bigbrain/#overview) 🍌 +[Way Points](https://hub.sp-tarkov.com/files/file/1119-waypoints-expanded-navmesh/) 🍌 +[That's Lit](https://hub.sp-tarkov.com/files/file/1453-that-s-lit/) 🍌 (With That's Lit Sync) +[Looting Bots](https://hub.sp-tarkov.com/files/file/1096-looting-bots/) 🍌 +[Questing Bots](https://hub.sp-tarkov.com/files/file/1534-questing-bots/#overview) 🍌🥒 + +#### Gameplay +[Project Fika](https://discord.gg/project-fika) ([Documentation](https://github.com/project-fika/fika-documentation)) 🍌🥒 +[Late to the Party](https://hub.sp-tarkov.com/files/file/1099-late-to-the-party/) 🍌🥒 (Realistic Scav runs) +[Backdoor Bandit](https://hub.sp-tarkov.com/files/file/1154-backdoor-bandit-bb/#overview) 🍌🥒 (Shoot open doors) +[Josh Mate's Better Backpacks](https://hub.sp-tarkov.com/files/file/772-josh-mate-s-better-backpacks/#overview) 🥒 (Backpack rebalance) +[Shiny Airdrop Guns!](https://hub.sp-tarkov.com/files/file/1572-shiny-airdrop-guns/) 🥒 (Some guns have innate stats) +[Headshot Damage Redirection](https://hub.sp-tarkov.com/files/file/1809-headshot-damage-redirection-hdr/) 🍌 (Portion of head damage distributed) +[Use Items Anywhere](https://hub.sp-tarkov.com/files/file/1416-use-items-anywhere/) 🍌 (Hotkey backpack items) +[Boss Notifier](https://hub.sp-tarkov.com/files/file/1737-boss-notifier/#overview) 🍌 (Inter center level 1-3 unlocks) +[Live Flea Prices](https://hub.sp-tarkov.com/files/file/1561-live-flea-prices/) 🥒 (Fetch flea prices from live server) + +#### QOL +[Dynamic Maps](https://hub.sp-tarkov.com/files/file/1981-dynamic-maps/) 🍌 +[Shoulder Swap On Lean](https://discord.com/channels/1202292159366037545/1222463708534407210) 🍌 +[Vocal Player](https://discord.com/channels/1202292159366037545/1230117857610698772) 🍌 (Announces actions) +[Expanded Task List](https://hub.sp-tarkov.com/files/file/1415-expanded-task-text-ett/) 🥒 (Detailed task list) +[Loot Value](https://hub.sp-tarkov.com/files/file/1606-lootvalue/) 🍌🥒 (Alt Shift M1 to quick sell) +[Item Info](https://hub.sp-tarkov.com/files/file/985-item-info/) 🥒 (Rarity recolor and detailed description) +[More Checkmarks](https://hub.sp-tarkov.com/files/file/1159-morecheckmarks/) 🍌🥒 (Show requirement for quests, hideout, crafting) +[Stash Search](https://hub.sp-tarkov.com/files/file/1769-stash-search/)) 🍌 (Ctrl F in stash +[UI Fixes](https://hub.sp-tarkov.com/files/file/1860-ui-fixes/) 🍌 (Drag to swap, UI QOL changes) +[Skipper](https://hub.sp-tarkov.com/files/file/1861-skipper/) 🍌 (Ctrl to skip quests) + +#### Visual +[FOV and Optics Fix](https://hub.sp-tarkov.com/files/file/942-fontaine-s-fov-fix-variable-optics/) 🍌🥒 (M4/5 to zoom in/out) +[Realistic NVG](https://hub.sp-tarkov.com/files/file/1303-borkel-s-realistic-night-vision-goggles-nvgs-and-t-7/) 🍌🥒 +[Realistic Thermal](https://hub.sp-tarkov.com/files/file/1510-borkel-s-big-realistic-thermal-package-bring-real-life-realism-to-your-thermal-s/) 🥒 +[Visceral Dismemberment](https://discord.com/channels/1202292159366037545/1236748474653872228) 🍌 +[Amands's Graphics](https://hub.sp-tarkov.com/files/file/813-amands-s-graphics/) 🍌 (Less fog, color grading) +[Custom Music Player](https://hub.sp-tarkov.com/files/file/1832-stalker-music-pack/#overview) 🥒 (Distributed with tracks) + +#### Disabled Mods +[Amands's Sense](https://hub.sp-tarkov.com/files/file/1361-amands-sense/#overview) 🍌 (Optional loot helper) +[Visceral Bodies](https://discord.com/channels/1202292159366037545/1228199049996402791) (Bodies glitch) +[Web Map](https://hub.sp-tarkov.com/files/file/1421-techhappy-s-web-minimap/#overview) 🍌 (Replaced by Dynamic Maps) +[Expanded Door Interactions](https://hub.sp-tarkov.com/files/file/1865-expanded-door-interactions/) 🍌 (Annoying UI) +[Declutterer](https://hub.sp-tarkov.com/files/file/1785-de-clutterer-updated-by-cj/) 🍌 (Optional performance mod) +[No Grenade ESP](https://hub.sp-tarkov.com/files/file/1029-no-grenade-esp/) 🍌 (Incompatible with SAIN) +[Pause](https://hub.sp-tarkov.com/files/file/1793-pause-reupload/) 🍌 (P to pause, may cause death) + +#### Default Hotkeys +- M4 to zoom + - M4 to dial optic in + - M5 to dial optic out +- F12 to change Fika Core settings such as health bar, damage multiplier, and AI range + - T to ping + - F9 to enter free cam + - M1/M2 to jump to player + - Space while jumping to snap to head + - Ctrl while jumping to snap to back + - T to teleport to free cam +- M2 item in stash to gift to other accounts +- Alt Shift M1 item in stash to automatically sell to most profitable market +- O to check bosses +- P to pause + +### Patch Note & Downloads + +##### 3.8.3_2 +[Package](http://www.mediafire.com/view/msx1i8v7aqdoxwk) +[Profile](http://www.mediafire.com/view/7i0apd7w7ax9rm1) + +**All mod files turned MO2 compatible and distributed separately.** This means that MO2 is not mandatory and merely makes updating easier. + +Added Dynamic Maps +Removed Web Map +Removed Expanded Door Interactions +Removed Declutterer +Removed No Grenade ESP +Removed Pause +Updated Fika + +##### 3.8.3_1 +[Package](http://www.mediafire.com/view/c87ornfb1ouw15p) + + +%%#### 3.8.1 +###### Patch 2024-05-15 for 3.8.1_3>4 +Added Custom Music Player +Updated Fika & DONUTS & Late to the Party Config +Updated SVM Preset + +###### Patch 2024-05-10 for 3.8.1_2>3 +Added Visceral Dismemberment +Added Vocal Player +Added Shoulder Swap On Lean +Updated Josh Mate's Better Backpacks +Updated Borkel's Realistic Night Vision Goggles +Updated Backdoor Bandit +Updated Server Value Modifier + +###### Patch 2024-05-07 for 3.8.1_1>2 +Updated Borkel's Realistic Night Vision Goggles +Updated Borkel's Big Realistic Thermal Package +Updated Config Files + +###### Patch 2024-05-06 for 3.8.1_0>1 +Added UI Fixes +Added Boss Notifier +Added Shiny Airdrop Guns!%% + +## Random Stuff + +![# Pestily's sights tier list](https://preview.redd.it/z65fblqhzfn61.jpg?width=4096&format=pjpg&auto=webp&s=dcb4ee991db7df8c7e5ec4f11556d29654d18ae8) diff --git a/docs/Wiki/Peer 3D Printing Service.md b/docs/Wiki/Peer 3D Printing Service.md new file mode 100644 index 00000000..df5869e2 --- /dev/null +++ b/docs/Wiki/Peer 3D Printing Service.md @@ -0,0 +1,237 @@ +--- +tags: + - wiki +share: true +--- +parents:: [[../../Yifu Ding|Yifu Ding]] + +# Peer 3D Printing Service + +End of Year 50% Off! + +*Cheaper, better, and faster than Stratasys PLA!* + +Pick up at Daniels or 404-Major Mackenzie Dr E. + +### Machine + +Bambu P1S with AMS +- Up to 4 filaments per plate +- Build volume XYZ: 225mm * 225mm * 250mm | 8.85in * 8.85in * 9.85in +- 0.4 mm hardened steel nozzle +- Bambu Studio slicer +### Service Charge + +| Plate Slicing & Setup | Time | Filament | +| :-------------------- | --------------------------------------------- | -------------------- | +| $8 + $4/plate | \$3 ~~$6~~/hr | As cheap as it gets! | + +> [!info] +> Slicing fee is discounted or waived depending on complexity. +> +> Slicing fee is waived for Bambu Studio sliced .3mf files, print failures are not covered and no support will be provided. If you understand the risks and seek complete control, use this [[./Attachments/Peer 3D Printing Service/Template.3mf|template]] to get started. + +### Getting Started + +1. Follow [[Peer 3D Printing Service#File Preparation|File Preparation]] and export files. +2. Choose your [[Peer 3D Printing Service#Filament|Filament]]. +3. Choose from one of the [[Peer 3D Printing Service#Quality Presets|Quality Presets]]. +4. Adjust [[Peer 3D Printing Service#Slicing Options|Slicing Options]] as needed. +5. Send your **ZIP** file, **filament**, **preset**, and **custom options** to Yifu Ding over Teams or [Email](mailto:yifu.ding@mail.utoronto.ca) for an estimate. +6. Email transfer fees to yifuding.twp@gmail.com + +#### File Preparation + +![[./Attachments/Peer 3D Printing Service/2024-04-10T21_01_21-05_00_TWP-X570-WIN10(Rhino).gif|2024-04-10T21_01_21-05_00_TWP-X570-WIN10(Rhino)]] + +##### Orientate + +Choose printing **orientation** for maximum smoothness. +- Printing a thin, organic piece vertically provides smoother detail and needs less support than laying it flat on the bed. + +##### Divide + +Divide large models exceeding the **build volume** with a **planar** cutter to provide **flat surfaces** that will adhere to the print bed nicely. +- Each model need to be a closed solid with no non-manifold geometry. They should be **watertight**. +- For pieces that are thin and tall, height is recommended to not exceed 100 mm. +- Keep in mind that any **overhang** exceeding 25 degrees will need substantial support structure which could be reduced or eliminated if they were divided and orientated differently. +- **WireCut** is a great command for this purpose. If WireCut didn't work on your model, chances are it isn't watertight and it won't print properly either. + +##### Export + +Files should be exported as **STL in millimetres**. +- Rhino files or incorrectly scaled STL will not be accepted. +- **Each separated body should be one file** regardless of which plate they may be on, to maximize nesting potential. + - When relative positioning is important, add a small bridge with a cross section of 0.5-1mm² (depending on strength requirement) directly on the print bed and boolean union all connected bodies. +- For multiple objects, use the Rhino command **RunPythonScript** with the [[./Attachments/Peer 3D Printing Service/BatchExportSTLByObj.py|Batch Export Python Script]] to export all selected files at once. +- Deliver more than one .stl files as a **ZIP**. + +#### Filament + +| PLA | $/kg | Hex Code | +| :------------------------ | -----: | ------------------------------------------------------------ | +| Matte Ivory White | 29.37 | FFFFFF | +| Matte Charcoal Black | 29.37 | 000000 | +| Matte Sakura Pink | 29.37 | E8AFCF | +| Matte Lilac Purple | 29.37 | AE96D4 | +| Basic Bambu Green | 29.37 | 00AE42 | +| Marble White | 44.06 | F7F3F0 | +| Silk Gold | 44.06 | E5B03D | +| Sparkle Crimson Red | 44.06 | 792B36 | +| Metal Iron Gray | 44.06 | 43403D | +| Breakaway Support | 101.68 | | +| PVA Water-soluble Support | 115.24 | | + +| ABS | $/kg | Hex Code | +| :---------- | ----: | ------------------------------------------------ | +| Basic White | 36.15 | FFFFFF | + +| PETG | $/kg | Hex Code | +| :---------- | ----: | ------------------------------------------------ | +| Basic White | 36.15 | FFFFFF | +| Basic Clear | 36.15 | | + +> [!info] +> Other filaments may be available upon request. +> [Bambu Lab Filament](https://ca.store.bambulab.com/collections/pla?skr=yes) + + +#### Quality Presets + +For 1 inch hollow cube with 2 walls: + +| Quality Presets | Layer Height (mm) | Time | Minimum $ (Time + Filament) | +| :---------------- | :---------------: | :---: | :-------------------------: | +| Extra Fine | 0.08 | 35:01 | 3.69 | +| Fine | 0.12 | 24:43 | 2.68 | +| Optimal (Default) | 0.16 | 19:04 | 2.11 | +| Standard | 0.20 | 15:42 | 1.77 | +| Draft | 0.24 | 13:10 | 1.44 | +| Extra Draft | 0.28 | 11:34 | 1.28 | + + +#### Slicing Options + +> [!info] +> Default value in parenthesis. +> +> Recommended settings are marked with ❗. +> +> Recommended values are marked with ⭕. + +Print Orientation ❗ + +Layer Height (0.16mm) ❗ +- Affects overhang performance + +Print Speed + +Wall Loops (2) ❗ + +Wall Generator (Classic) +- Classic ⭕ +- Arachne ⭕ + +Order of Walls (Inner / Outer) +- Inner / Outer +- Outer / Inner +- Inner / Outer / Inner + +X-Y Hole Compensation (0mm) + +X-Y Contour Compensation (0mm) + +Infill Pattern (Grid) ❗ +- Concentric +- Rectilinear ⭕ +- Grid ⭕ +- Line ⭕ +- Cubic ⭕ +- Triangles +- Tri-hexagon +- Gyroid ⭕ +- Honeycomb +- Adaptive Cubic ⭕ +- Aligned Rectilinear +- 3D Honeycomb +- Hilbert Curve +- Archimedean Chords +- Octagram Spiral +- Support Cubic ⭕ +- Lighting ⭕ + +Infill Percentage 0-100% (15%) ❗ + +Support (Normal Automatic) ❗ +1. Normal Automatic +2. Normal Manual +3. Tree Automatic +4. Tree Manual + +Raft (None) + +Brim (Auto) ❗ +1. Auto ⭕ +2. Outer Brim Only ⭕ +3. Inner Brim Only +4. Outer And Inner Brim +5. No Brim ⭕ + +Fuzzy Skin (None) ❗ +- None +- Contour +- Contour And Hole +- All Walls + +Surface Pattern (Monotonic) +1. Concentric ⭕ +2. Rectilinear +3. Monotonic ⭕ +4. Monotonic Line +5. Aligned Rectilinear ⭕ +6. Hilbert Curve +7. Archimedean Chords +8. Octagram Spiral + +Ironing (Top Surfaces) ❗ +1. None ⭕ +2. Top Surfaces ⭕ +3. Topmost Surface +4. All Solid Layer + +Ironing Pattern (Rectilinear) +1. Concentric ⭕ +2. Rectilinear ⭕ + +Thick Bridges (None) + +Seam Positions (Aligned) +1. Nearest +2. Aligned +3. Back +4. Random + +Scarf Joint Seam (Contour And Hole) +1. None +2. Contour +3. Contour And Hole + +### Showcase + +![[./Attachments/Peer 3D Printing Service/Showcase-Arjay Asuncion.jpg|400]] + +by Arjay Asuncion - 2024 + +### FAQ + +###### *Why is there a setup fee? For each plate?* + +This setup fee allows me to take more care optimizing your print file and compensates me for my continued presence. Optimizations can massively reduce your print time and filament, lowering total cost, but each job is different and it takes time. I try my best to provide affordable and environmentally responsible printing service, which is why I offer my time and expertise at a modest fee. You'll always have the option to slice it by yourself and I am pleased to waive the setup fee for such cases, but current success rate for this option is only 0%. +![[./Attachments/Peer 3D Printing Service/2024-04-10T00_15_05.jpg|200]] + +%% +### Tiny Tracker + +Abida - 3.95 + +%% \ No newline at end of file diff --git a/docs/advanced/architecture.md b/docs/advanced/architecture.md deleted file mode 100644 index 33da89d9..00000000 --- a/docs/advanced/architecture.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Architecture ---- - -Quartz is a static site generator. How does it work? - -This question is best answered by tracing what happens when a user (you!) runs `npx quartz build` in the command line: - -## On the server - -1. After running `npx quartz build`, npm will look at `package.json` to find the `bin` entry for `quartz` which points at `./quartz/bootstrap-cli.mjs`. -2. This file has a [shebang]() line at the top which tells npm to execute it using Node. -3. `bootstrap-cli.mjs` is responsible for a few things: - 1. Parsing the command-line arguments using [yargs](http://yargs.js.org/). - 2. Transpiling and bundling the rest of Quartz (which is in Typescript) to regular JavaScript using [esbuild](https://esbuild.github.io/). The `esbuild` configuration here is slightly special as it also handles `.scss` file imports using [esbuild-sass-plugin v2](https://www.npmjs.com/package/esbuild-sass-plugin). Additionally, we bundle 'inline' client-side scripts (any `.inline.ts` file) that components declare using a custom `esbuild` plugin that runs another instance of `esbuild` which bundles for the browser instead of `node`. Modules of both types are imported as plain text. - 3. Running the local preview server if `--serve` is set. This starts two servers: - 1. A WebSocket server on port 3001 to handle hot-reload signals. This tracks all inbound connections and sends a 'rebuild' message a server-side change is detected (either content or configuration). - 2. An HTTP file-server on a user defined port (normally 8080) to serve the actual website files. - 4. If the `--serve` flag is set, it also starts a file watcher to detect source-code changes (e.g. anything that is `.ts`, `.tsx`, `.scss`, or packager files). On a change, we rebuild the module (step 2 above) using esbuild's [rebuild API](https://esbuild.github.io/api/#rebuild) which drastically reduces the build times. - 5. After transpiling the main Quartz build module (`quartz/build.ts`), we write it to a cache file `.quartz-cache/transpiled-build.mjs` and then dynamically import this using `await import(cacheFile)`. However, we need to be pretty smart about how to bust Node's [import cache](https://github.com/nodejs/modules/issues/307) so we add a random query string to fake Node into thinking it's a new module. This does, however, cause memory leaks so we just hope that the user doesn't hot-reload their configuration too many times in a single session :)) (it leaks about ~350kB memory on each reload). After importing the module, we then invoke it, passing in the command line arguments we parsed earlier along with a callback function to signal the client to refresh. -4. In `build.ts`, we start by installing source map support manually to account for the query string cache busting hack we introduced earlier. Then, we start processing content: - 1. Clean the output directory. - 2. Recursively glob all files in the `content` folder, respecting the `.gitignore`. - 3. Parse the Markdown files. - 1. Quartz detects the number of threads available and chooses to spawn worker threads if there are >128 pieces of content to parse (rough heuristic). If it needs to spawn workers, it will invoke esbuild again to transpile the worker script `quartz/worker.ts`. Then, a work-stealing [workerpool](https://www.npmjs.com/package/workerpool) is then created and batches of 128 files are assigned to workers. - 2. Each worker (or just the main thread if there is no concurrency) creates a [unified](https://github.com/unifiedjs/unified) parser based off of the plugins defined in the [[configuration]]. - 3. Parsing has three steps: - 1. Read the file into a [vfile](https://github.com/vfile/vfile). - 2. Applied plugin-defined text transformations over the content. - 3. Slugify the file path and store it in the data for the file. See the page on [[paths]] for more details about how path logic works in Quartz (spoiler: its complicated). - 4. Markdown parsing using [remark-parse](https://www.npmjs.com/package/remark-parse) (text to [mdast](https://github.com/syntax-tree/mdast)). - 5. Apply plugin-defined Markdown-to-Markdown transformations. - 6. Convert Markdown into HTML using [remark-rehype](https://github.com/remarkjs/remark-rehype) ([mdast](https://github.com/syntax-tree/mdast) to [hast](https://github.com/syntax-tree/hast)). - 7. Apply plugin-defined HTML-to-HTML transformations. - 4. Filter out unwanted content using plugins. - 5. Emit files using plugins. - 1. Gather all the static resources (e.g. external CSS, JS modules, etc.) each emitter plugin declares. - 2. Emitters that emit HTML files do a bit of extra work here as they need to transform the [hast](https://github.com/syntax-tree/hast) produced in the parse step to JSX. This is done using [hast-util-to-jsx-runtime](https://github.com/syntax-tree/hast-util-to-jsx-runtime) with the [Preact](https://preactjs.com/) runtime. Finally, the JSX is rendered to HTML using [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) which statically renders the JSX to HTML (i.e. doesn't care about `useState`, `useEffect`, or any other React/Preact interactive bits). Here, we also do a bunch of fun stuff like assemble the page [[layout]] from `quartz.layout.ts`, assemble all the inline scripts that actually get shipped to the client, and all the transpiled styles. The bulk of this logic can be found in `quartz/components/renderPage.tsx`. Other fun things of note: - 1. CSS is minified and transformed using [Lightning CSS](https://github.com/parcel-bundler/lightningcss) to add vendor prefixes and do syntax lowering. - 2. Scripts are split into `beforeDOMLoaded` and `afterDOMLoaded` and are inserted in the `` and `` respectively. - 3. Finally, each emitter plugin is responsible for emitting and writing it's own emitted files to disk. - 6. If the `--serve` flag was detected, we also set up another file watcher to detect content changes (only `.md` files). We keep a content map that tracks the parsed AST and plugin data for each slug and update this on file changes. Newly added or modified paths are rebuilt and added to the content map. Then, all the filters and emitters are run over the resulting content map. This file watcher is debounced with a threshold of 250ms. On success, we send a client refresh signal using the passed in callback function. - -## On the client - -1. The browser opens a Quartz page and loads the HTML. The `` also links to page styles (emitted to `public/index.css`) and page-critical JS (emitted to `public/prescript.js`) -2. Then, once the body is loaded, the browser loads the non-critical JS (emitted to `public/postscript.js`) -3. Once the page is done loading, the page will then dispatch a custom synthetic browser event `"nav"`. This is used so client-side scripts declared by components can 'setup' anything that requires access to the page DOM. - 1. If the [[SPA Routing|enableSPA option]] is enabled in the [[configuration]], this `"nav"` event is also fired on any client-navigation to allow for components to unregister and reregister any event handlers and state. - 2. If it's not, we wire up the `"nav"` event to just be fired a single time after page load to allow for consistency across how state is setup across both SPA and non-SPA contexts. - -The architecture and design of the plugin system was intentionally left pretty vague here as this is described in much more depth in the guide on [[making plugins|making your own plugin]]. diff --git a/docs/advanced/creating components.md b/docs/advanced/creating components.md deleted file mode 100644 index 27369abf..00000000 --- a/docs/advanced/creating components.md +++ /dev/null @@ -1,234 +0,0 @@ ---- -title: Creating your own Quartz components ---- - -> [!warning] -> This guide assumes you have experience writing JavaScript and are familiar with TypeScript. - -Normally on the web, we write layout code using HTML which looks something like the following: - -```html -
-

An article header

-

Some content

-
-``` - -This piece of HTML represents an article with a leading header that says "An article header" and a paragraph that contains the text "Some content". This is combined with CSS to style the page and JavaScript to add interactivity. - -However, HTML doesn't let you create reusable templates. If you wanted to create a new page, you would need to copy and paste the above snippet and edit the header and content yourself. This isn't great if we have a lot of content on our site that shares a lot of similar layout. The smart people who created React also had similar complaints and invented the concept of Components -- JavaScript functions that return JSX -- to solve the code duplication problem. - -In effect, components allow you to write a JavaScript function that takes some data and produces HTML as an output. **While Quartz doesn't use React, it uses the same component concept to allow you to easily express layout templates in your Quartz site.** - -## An Example Component - -### Constructor - -Component files are written in `.tsx` files that live in the `quartz/components` folder. These are re-exported in `quartz/components/index.ts` so you can use them in layouts and other components more easily. - -Each component file should have a default export that satisfies the `QuartzComponentConstructor` function signature. It's a function that takes in a single optional parameter `opts` and returns a Quartz Component. The type of the parameters `opts` is defined by the interface `Options` which you as the component creator also decide. - -In your component, you can use the values from the configuration option to change the rendering behaviour inside of your component. For example, the component in the code snippet below will not render if the `favouriteNumber` option is below 0. - -```tsx {11-17} -interface Options { - favouriteNumber: number -} - -const defaultOptions: Options = { - favouriteNumber: 42, -} - -export default ((userOpts?: Options) => { - const opts = { ...userOpts, ...defaultOpts } - function YourComponent(props: QuartzComponentProps) { - if (opts.favouriteNumber < 0) { - return null - } - - return

My favourite number is {opts.favouriteNumber}

- } - - return YourComponent -}) satisfies QuartzComponentConstructor -``` - -### Props - -The Quartz component itself (lines 11-17 highlighted above) looks like a React component. It takes in properties (sometimes called [props](https://react.dev/learn/passing-props-to-a-component)) and returns JSX. - -All Quartz components accept the same set of props: - -```tsx title="quartz/components/types.ts" -// simplified for sake of demonstration -export type QuartzComponentProps = { - fileData: QuartzPluginData - cfg: GlobalConfiguration - tree: Node - allFiles: QuartzPluginData[] - displayClass?: "mobile-only" | "desktop-only" -} -``` - -- `fileData`: Any metadata [[making plugins|plugins]] may have added to the current page. - - `fileData.slug`: slug of the current page. - - `fileData.frontmatter`: any frontmatter parsed. -- `cfg`: The `configuration` field in `quartz.config.ts`. -- `tree`: the resulting [HTML AST](https://github.com/syntax-tree/hast) after processing and transforming the file. This is useful if you'd like to render the content using [hast-util-to-jsx-runtime](https://github.com/syntax-tree/hast-util-to-jsx-runtime) (you can find an example of this in `quartz/components/pages/Content.tsx`). -- `allFiles`: Metadata for all files that have been parsed. Useful for doing page listings or figuring out the overall site structure. -- `displayClass`: a utility class that indicates a preference from the user about how to render it in a mobile or desktop setting. Helpful if you want to conditionally hide a component on mobile or desktop. - -### Styling - -Quartz components can also define a `.css` property on the actual function component which will get picked up by Quartz. This is expected to be a CSS string which can either be inlined or imported from a `.scss` file. - -Note that inlined styles **must** be plain vanilla CSS: - -```tsx {6-10} title="quartz/components/YourComponent.tsx" -export default (() => { - function YourComponent() { - return

Example Component

- } - - YourComponent.css = ` - p.red-text { - color: red; - } - ` - - return YourComponent -}) satisfies QuartzComponentConstructor -``` - -Imported styles, however, can be from SCSS files: - -```tsx {1-2,9} title="quartz/components/YourComponent.tsx" -// assuming your stylesheet is in quartz/components/styles/YourComponent.scss -import styles from "./styles/YourComponent.scss" - -export default (() => { - function YourComponent() { - return

Example Component

- } - - YourComponent.css = styles - return YourComponent -}) satisfies QuartzComponentConstructor -``` - -> [!warning] -> Quartz does not use CSS modules so any styles you declare here apply _globally_. If you only want it to apply to your component, make sure you use specific class names and selectors. - -### Scripts and Interactivity - -What about interactivity? Suppose you want to add an-click handler for example. Like the `.css` property on the component, you can also declare `.beforeDOMLoaded` and `.afterDOMLoaded` properties that are strings that contain the script. - -```tsx title="quartz/components/YourComponent.tsx" -export default (() => { - function YourComponent() { - return - } - - YourComponent.beforeDOM = ` - console.log("hello from before the page loads!") - ` - - YourComponent.afterDOM = ` - document.getElementById('btn').onclick = () => { - alert('button clicked!') - } - ` - return YourComponent -}) satisfies QuartzComponentConstructor -``` - -> [!hint] -> For those coming from React, Quartz components are different from React components in that it only uses JSX for templating and layout. Hooks like `useEffect`, `useState`, etc. are not rendered and other properties that accept functions like `onClick` handlers will not work. Instead, do it using a regular JS script that modifies the DOM element directly. - -As the names suggest, the `.beforeDOMLoaded` scripts are executed _before_ the page is done loading so it doesn't have access to any elements on the page. This is mostly used to prefetch any critical data. - -The `.afterDOMLoaded` script executes once the page has been completely loaded. This is a good place to setup anything that should last for the duration of a site visit (e.g. getting something saved from local storage). - -If you need to create an `afterDOMLoaded` script that depends on _page specific_ elements that may change when navigating to a new page, you can listen for the `"nav"` event that gets fired whenever a page loads (which may happen on navigation if [[SPA Routing]] is enabled). - -```ts -document.addEventListener("nav", () => { - // do page specific logic here - // e.g. attach event listeners - const toggleSwitch = document.querySelector("#switch") as HTMLInputElement - toggleSwitch.addEventListener("change", switchTheme) - window.addCleanup(() => toggleSwitch.removeEventListener("change", switchTheme)) -}) -``` - -It is best practice to track any event handlers via `window.addCleanup` to prevent memory leaks. -This will get called on page navigation. - -#### Importing Code - -Of course, it isn't always practical (nor desired!) to write your code as a string literal in the component. - -Quartz supports importing component code through `.inline.ts` files. - -```tsx title="quartz/components/YourComponent.tsx" -// @ts-ignore: typescript doesn't know about our inline bundling system -// so we need to silence the error -import script from "./scripts/graph.inline" - -export default (() => { - function YourComponent() { - return - } - - YourComponent.afterDOM = script - return YourComponent -}) satisfies QuartzComponentConstructor -``` - -```ts title="quartz/components/scripts/graph.inline.ts" -// any imports here are bundled for the browser -import * as d3 from "d3" - -document.getElementById("btn").onclick = () => { - alert("button clicked!") -} -``` - -Additionally, like what is shown in the example above, you can import packages in `.inline.ts` files. This will be bundled by Quartz and included in the actual script. - -### Using a Component - -After creating your custom component, re-export it in `quartz/components/index.ts`: - -```ts title="quartz/components/index.ts" {4,10} -import ArticleTitle from "./ArticleTitle" -import Content from "./pages/Content" -import Darkmode from "./Darkmode" -import YourComponent from "./YourComponent" - -export { ArticleTitle, Content, Darkmode, YourComponent } -``` - -Then, you can use it like any other component in `quartz.layout.ts` via `Component.YourComponent()`. See the [[configuration#Layout|layout]] section for more details. - -As Quartz components are just functions that return React components, you can compositionally use them in other Quartz components. - -```tsx title="quartz/components/AnotherComponent.tsx" -import YourComponent from "./YourComponent" - -export default (() => { - function AnotherComponent(props: QuartzComponentProps) { - return ( -
-

It's nested!

- -
- ) - } - - return AnotherComponent -}) satisfies QuartzComponentConstructor -``` - -> [!hint] -> Look in `quartz/components` for more examples of components in Quartz as reference for your own components! diff --git a/docs/advanced/making plugins.md b/docs/advanced/making plugins.md deleted file mode 100644 index b2bacf0a..00000000 --- a/docs/advanced/making plugins.md +++ /dev/null @@ -1,303 +0,0 @@ ---- -title: Making your own plugins ---- - -> [!warning] -> This part of the documentation will assume you have working knowledge in TypeScript and will include code snippets that describe the interface of what Quartz plugins should look like. - -Quartz's plugins are a series of transformations over content. This is illustrated in the diagram of the processing pipeline below: - -![[quartz transform pipeline.png]] - -All plugins are defined as a function that takes in a single parameter for options `type OptionType = object | undefined` and return an object that corresponds to the type of plugin it is. - -```ts -type OptionType = object | undefined -type QuartzPlugin = (opts?: Options) => QuartzPluginInstance -type QuartzPluginInstance = - | QuartzTransformerPluginInstance - | QuartzFilterPluginInstance - | QuartzEmitterPluginInstance -``` - -The following sections will go into detail for what methods can be implemented for each plugin type. Before we do that, let's clarify a few more ambiguous types: - -- `BuildCtx` is defined in `quartz/ctx.ts`. It consists of - - `argv`: The command line arguments passed to the Quartz [[build]] command - - `cfg`: The full Quartz [[configuration]] - - `allSlugs`: a list of all the valid content slugs (see [[paths]] for more information on what a `ServerSlug` is) -- `StaticResources` is defined in `quartz/resources.tsx`. It consists of - - `css`: a list of URLs for stylesheets that should be loaded - - `js`: a list of scripts that should be loaded. A script is described with the `JSResource` type which is also defined in `quartz/resources.tsx`. It allows you to define a load time (either before or after the DOM has been loaded), whether it should be a module, and either the source URL or the inline content of the script. - -## Transformers - -Transformers **map** over content, taking a Markdown file and outputting modified content or adding metadata to the file itself. - -```ts -export type QuartzTransformerPluginInstance = { - name: string - textTransform?: (ctx: BuildCtx, src: string | Buffer) => string | Buffer - markdownPlugins?: (ctx: BuildCtx) => PluggableList - htmlPlugins?: (ctx: BuildCtx) => PluggableList - externalResources?: (ctx: BuildCtx) => Partial -} -``` - -All transformer plugins must define at least a `name` field to register the plugin and a few optional functions that allow you to hook into various parts of transforming a single Markdown file. - -- `textTransform` performs a text-to-text transformation _before_ a file is parsed into the [Markdown AST](https://github.com/syntax-tree/mdast). -- `markdownPlugins` defines a list of [remark plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md). `remark` is a tool that transforms Markdown to Markdown in a structured way. -- `htmlPlugins` defines a list of [rehype plugins](https://github.com/rehypejs/rehype/blob/main/doc/plugins.md). Similar to how `remark` works, `rehype` is a tool that transforms HTML to HTML in a structured way. -- `externalResources` defines any external resources the plugin may need to load on the client-side for it to work properly. - -Normally for both `remark` and `rehype`, you can find existing plugins that you can use to . If you'd like to create your own `remark` or `rehype` plugin, checkout the [guide to creating a plugin](https://unifiedjs.com/learn/guide/create-a-plugin/) using `unified` (the underlying AST parser and transformer library). - -A good example of a transformer plugin that borrows from the `remark` and `rehype` ecosystems is the [[plugins/Latex|Latex]] plugin: - -```ts title="quartz/plugins/transformers/latex.ts" -import remarkMath from "remark-math" -import rehypeKatex from "rehype-katex" -import rehypeMathjax from "rehype-mathjax/svg" -import { QuartzTransformerPlugin } from "../types" - -interface Options { - renderEngine: "katex" | "mathjax" -} - -export const Latex: QuartzTransformerPlugin = (opts?: Options) => { - const engine = opts?.renderEngine ?? "katex" - return { - name: "Latex", - markdownPlugins() { - return [remarkMath] - }, - htmlPlugins() { - if (engine === "katex") { - // if you need to pass options into a plugin, you - // can use a tuple of [plugin, options] - return [[rehypeKatex, { output: "html" }]] - } else { - return [rehypeMathjax] - } - }, - externalResources() { - if (engine === "katex") { - return { - css: [ - // base css - "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css", - ], - js: [ - { - // fix copy behaviour: https://github.com/KaTeX/KaTeX/blob/main/contrib/copy-tex/README.md - src: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/contrib/copy-tex.min.js", - loadTime: "afterDOMReady", - contentType: "external", - }, - ], - } - } else { - return {} - } - }, - } -} -``` - -Another common thing that transformer plugins will do is parse a file and add extra data for that file: - -```ts -export const AddWordCount: QuartzTransformerPlugin = () => { - return { - name: "AddWordCount", - markdownPlugins() { - return [ - () => { - return (tree, file) => { - // tree is an `mdast` root element - // file is a `vfile` - const text = file.value - const words = text.split(" ").length - file.data.wordcount = words - } - }, - ] - }, - } -} - -// tell typescript about our custom data fields we are adding -// other plugins will then also be aware of this data field -declare module "vfile" { - interface DataMap { - wordcount: number - } -} -``` - -Finally, you can also perform transformations over Markdown or HTML ASTs using the `visit` function from the `unist-util-visit` package or the `findAndReplace` function from the `mdast-util-find-and-replace` package. - -```ts -export const TextTransforms: QuartzTransformerPlugin = () => { - return { - name: "TextTransforms", - markdownPlugins() { - return [() => { - return (tree, file) => { - // replace _text_ with the italics version - findAndReplace(tree, /_(.+)_/, (_value: string, ...capture: string[]) => { - // inner is the text inside of the () of the regex - const [inner] = capture - // return an mdast node - // https://github.com/syntax-tree/mdast - return { - type: "emphasis", - children: [{ type: 'text', value: inner }] - } - }) - - // remove all links (replace with just the link content) - // match by 'type' field on an mdast node - // https://github.com/syntax-tree/mdast#link in this example - visit(tree, "link", (link: Link) => { - return { - type: "paragraph" - children: [{ type: 'text', value: link.title }] - } - }) - } - }] - } - } -} -``` - -All transformer plugins can be found under `quartz/plugins/transformers`. If you decide to write your own transformer plugin, don't forget to re-export it under `quartz/plugins/transformers/index.ts` - -A parting word: transformer plugins are quite complex so don't worry if you don't get them right away. Take a look at the built in transformers and see how they operate over content to get a better sense for how to accomplish what you are trying to do. - -## Filters - -Filters **filter** content, taking the output of all the transformers and determining what files to actually keep and what to discard. - -```ts -export type QuartzFilterPlugin = ( - opts?: Options, -) => QuartzFilterPluginInstance - -export type QuartzFilterPluginInstance = { - name: string - shouldPublish(ctx: BuildCtx, content: ProcessedContent): boolean -} -``` - -A filter plugin must define a `name` field and a `shouldPublish` function that takes in a piece of content that has been processed by all the transformers and returns a `true` or `false` depending on whether it should be passed to the emitter plugins or not. - -For example, here is the built-in plugin for removing drafts: - -```ts title="quartz/plugins/filters/draft.ts" -import { QuartzFilterPlugin } from "../types" - -export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({ - name: "RemoveDrafts", - shouldPublish(_ctx, [_tree, vfile]) { - // uses frontmatter parsed from transformers - const draftFlag: boolean = vfile.data?.frontmatter?.draft ?? false - return !draftFlag - }, -}) -``` - -## Emitters - -Emitters **reduce** over content, taking in a list of all the transformed and filtered content and creating output files. - -```ts -export type QuartzEmitterPlugin = ( - opts?: Options, -) => QuartzEmitterPluginInstance - -export type QuartzEmitterPluginInstance = { - name: string - emit(ctx: BuildCtx, content: ProcessedContent[], resources: StaticResources): Promise - getQuartzComponents(ctx: BuildCtx): QuartzComponent[] -} -``` - -An emitter plugin must define a `name` field, an `emit` function, and a `getQuartzComponents` function. `emit` is responsible for looking at all the parsed and filtered content and then appropriately creating files and returning a list of paths to files the plugin created. - -Creating new files can be done via regular Node [fs module](https://nodejs.org/api/fs.html) (i.e. `fs.cp` or `fs.writeFile`) or via the `write` function in `quartz/plugins/emitters/helpers.ts` if you are creating files that contain text. `write` has the following signature: - -```ts -export type WriteOptions = (data: { - // the build context - ctx: BuildCtx - // the name of the file to emit (not including the file extension) - slug: ServerSlug - // the file extension - ext: `.${string}` | "" - // the file content to add - content: string -}) => Promise -``` - -This is a thin wrapper around writing to the appropriate output folder and ensuring that intermediate directories exist. If you choose to use the native Node `fs` APIs, ensure you emit to the `argv.output` folder as well. - -If you are creating an emitter plugin that needs to render components, there are three more things to be aware of: - -- Your component should use `getQuartzComponents` to declare a list of `QuartzComponents` that it uses to construct the page. See the page on [[creating components]] for more information. -- You can use the `renderPage` function defined in `quartz/components/renderPage.tsx` to render Quartz components into HTML. -- If you need to render an HTML AST to JSX, you can use the `htmlToJsx` function from `quartz/util/jsx.ts`. An example of this can be found in `quartz/components/pages/Content.tsx`. - -For example, the following is a simplified version of the content page plugin that renders every single page. - -```tsx title="quartz/plugins/emitters/contentPage.tsx" -export const ContentPage: QuartzEmitterPlugin = () => { - // construct the layout - const layout: FullPageLayout = { - ...sharedPageComponents, - ...defaultContentPageLayout, - pageBody: Content(), - } - const { head, header, beforeBody, pageBody, left, right, footer } = layout - return { - name: "ContentPage", - getQuartzComponents() { - return [head, ...header, ...beforeBody, pageBody, ...left, ...right, footer] - }, - async emit(ctx, content, resources, emit): Promise { - const cfg = ctx.cfg.configuration - const fps: FilePath[] = [] - const allFiles = content.map((c) => c[1].data) - for (const [tree, file] of content) { - const slug = canonicalizeServer(file.data.slug!) - const externalResources = pageResources(slug, resources) - const componentData: QuartzComponentProps = { - fileData: file.data, - externalResources, - cfg, - children: [], - tree, - allFiles, - } - - const content = renderPage(cfg, slug, componentData, opts, externalResources) - const fp = await emit({ - content, - slug: file.data.slug!, - ext: ".html", - }) - - fps.push(fp) - } - return fps - }, - } -} -``` - -Note that it takes in a `FullPageLayout` as the options. It's made by combining a `SharedLayout` and a `PageLayout` both of which are provided through the `quartz.layout.ts` file. - -> [!hint] -> Look in `quartz/plugins` for more examples of plugins in Quartz as reference for your own plugins! diff --git a/docs/advanced/paths.md b/docs/advanced/paths.md deleted file mode 100644 index 9455b981..00000000 --- a/docs/advanced/paths.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Paths in Quartz ---- - -Paths are pretty complex to reason about because, especially for a static site generator, they can come from so many places. - -A full file path to a piece of content? Also a path. What about a slug for a piece of content? Yet another path. - -It would be silly to type these all as `string` and call it a day as it's pretty common to accidentally mistake one type of path for another. Unfortunately, TypeScript does not have [nominal types](https://en.wikipedia.org/wiki/Nominal_type_system) for type aliases meaning even if you made custom types of a server-side slug or a client-slug slug, you can still accidentally assign one to another and TypeScript wouldn't catch it. - -Luckily, we can mimic nominal typing using [brands](https://www.typescriptlang.org/play#example/nominal-typing). - -```typescript -// instead of -type FullSlug = string - -// we do -type FullSlug = string & { __brand: "full" } - -// that way, the following will fail typechecking -const slug: FullSlug = "some random string" -``` - -While this prevents most typing mistakes _within_ our nominal typing system (e.g. mistaking a server slug for a client slug), it doesn't prevent us from _accidentally_ mistaking a string for a client slug when we forcibly cast it. - -Thus, we still need to be careful when casting from a string to one of these nominal types in the 'entrypoints', illustrated with hexagon shapes in the diagram below. - -The following diagram draws the relationships between all the path sources, nominal path types, and what functions in `quartz/path.ts` convert between them. - -```mermaid -graph LR - Browser{{Browser}} --> Window{{Body}} & LinkElement{{Link Element}} - Window --"getFullSlug()"--> FullSlug[Full Slug] - LinkElement --".href"--> Relative[Relative URL] - FullSlug --"simplifySlug()" --> SimpleSlug[Simple Slug] - SimpleSlug --"pathToRoot()"--> Relative - SimpleSlug --"resolveRelative()" --> Relative - MD{{Markdown File}} --> FilePath{{File Path}} & Links[Markdown links] - Links --"transformLink()"--> Relative - FilePath --"slugifyFilePath()"--> FullSlug[Full Slug] - style FullSlug stroke-width:4px -``` - -Here are the main types of slugs with a rough description of each type of path: - -- `FilePath`: a real file path to a file on disk. Cannot be relative and must have a file extension. -- `FullSlug`: cannot be relative and may not have leading or trailing slashes. It can have `index` as it's last segment. Use this wherever possible is it's the most 'general' interpretation of a slug. -- `SimpleSlug`: cannot be relative and shouldn't have `/index` as an ending or a file extension. It _can_ however have a trailing slash to indicate a folder path. -- `RelativeURL`: must start with `.` or `..` to indicate it's a relative URL. Shouldn't have `/index` as an ending or a file extension but can contain a trailing slash. - -To get a clearer picture of how these relate to each other, take a look at the path tests in `quartz/path.test.ts`. diff --git a/docs/authoring content.md b/docs/authoring content.md deleted file mode 100644 index d872a964..00000000 --- a/docs/authoring content.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Authoring Content ---- - -All of the content in your Quartz should go in the `/content` folder. The content for the home page of your Quartz lives in `content/index.md`. If you've [[index#🪴 Get Started|setup Quartz]] already, this folder should already be initialized. Any Markdown in this folder will get processed by Quartz. - -It is recommended that you use [Obsidian](https://obsidian.md/) as a way to edit and maintain your Quartz. It comes with a nice editor and graphical interface to preview, edit, and link your local files and attachments. - -Got everything setup? Let's [[build]] and preview your Quartz locally! - -## Syntax - -As Quartz uses Markdown files as the main way of writing content, it fully supports Markdown syntax. By default, Quartz also ships with a few syntax extensions like [Github Flavored Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) (footnotes, strikethrough, tables, tasklists) and [Obsidian Flavored Markdown](https://help.obsidian.md/Editing+and+formatting/Obsidian+Flavored+Markdown) ([[callouts]], [[wikilinks]]). - -Additionally, Quartz also allows you to specify additional metadata in your notes called **frontmatter**. - -```md title="content/note.md" ---- -title: Example Title -draft: false -tags: - - example-tag ---- - -The rest of your content lives here. You can use **Markdown** here :) -``` - -Some common frontmatter fields that are natively supported by Quartz: - -- `title`: Title of the page. If it isn't provided, Quartz will use the name of the file as the title. -- `description`: Description of the page used for link previews. -- `aliases`: Other names for this note. This is a list of strings. -- `tags`: Tags for this note. -- `draft`: Whether to publish the page or not. This is one way to make [[private pages|pages private]] in Quartz. -- `date`: A string representing the day the note was published. Normally uses `YYYY-MM-DD` format. - -## Syncing your Content - -When your Quartz is at a point you're happy with, you can save your changes to GitHub. -First, make sure you've [[setting up your GitHub repository|already setup your GitHub repository]] and then do `npx quartz sync`. - -## Customization - -Frontmatter parsing for `title`, `tags`, `aliases` and `cssclasses` is a functionality of the [[Frontmatter]] plugin, `date` is handled by the [[CreatedModifiedDate]] plugin and `description` by the [[Description]] plugin. See the plugin pages for customization options. diff --git a/docs/build.md b/docs/build.md deleted file mode 100644 index 14476875..00000000 --- a/docs/build.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Building your Quartz" ---- - -Once you've [[index#🪴 Get Started|initialized]] Quartz, let's see what it looks like locally: - -```bash -npx quartz build --serve -``` - -This will start a local web server to run your Quartz on your computer. Open a web browser and visit `http://localhost:8080/` to view it. - -> [!hint] Flags and options -> For full help options, you can run `npx quartz build --help`. -> -> Most of these have sensible defaults but you can override them if you have a custom setup: -> -> - `-d` or `--directory`: the content folder. This is normally just `content` -> - `-v` or `--verbose`: print out extra logging information -> - `-o` or `--output`: the output folder. This is normally just `public` -> - `--serve`: run a local hot-reloading server to preview your Quartz -> - `--port`: what port to run the local preview server on -> - `--concurrency`: how many threads to use to parse notes diff --git a/docs/configuration.md b/docs/configuration.md deleted file mode 100644 index 64968fbb..00000000 --- a/docs/configuration.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Configuration ---- - -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` or changing [[layout|the layout]] in `quartz.layout.ts`. - -> [!tip] -> If you edit Quartz configuration 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, helping you avoid configuration mistakes! - -The configuration of Quartz can be broken down into two main parts: - -```ts title="quartz.config.ts" -const config: QuartzConfig = { - configuration: { ... }, - plugins: { ... }, -} -``` - -## General Configuration - -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: - -- `pageTitle`: title of the site. This is also used when generating the [[RSS Feed]] for your site. -- `enableSPA`: whether to enable [[SPA Routing]] on your site. -- `enablePopovers`: whether to enable [[popover previews]] on your site. -- `analytics`: what to use for analytics on your site. Values can be - - `null`: don't use analytics; - - `{ provider: 'google', tagId: '' }`: use Google Analytics; - - `{ provider: 'plausible' }` (managed) or `{ provider: 'plausible', host: '' }` (self-hosted): use [Plausible](https://plausible.io/); - - `{ provider: 'umami', host: '', websiteId: '' }`: use [Umami](https://umami.is/); - - `{ provider: 'goatcounter', websiteId: 'my-goatcounter-id' }` (managed) or `{ provider: 'goatcounter', websiteId: 'my-goatcounter-id', host: 'my-goatcounter-domain.com', scriptSrc: 'https://my-url.to/counter.js' }` (self-hosted) use [GoatCounter](https://goatcounter.com) -- `locale`: used for [[i18n]] and date formatting -- `baseUrl`: 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. `quartz.jzhao.xyz` for this site). Do not include the protocol (i.e. `https://`) or any leading or trailing slashes. - - This should also include the subpath if you are [[hosting]] on GitHub pages without a custom domain. For example, if my repository is `jackyzha0/quartz`, GitHub pages would deploy to `https://jackyzha0.github.io/quartz` and the `baseUrl` would be `jackyzha0.github.io/quartz`. - - 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. -- `ignorePatterns`: a list of [glob]() patterns that Quartz should ignore and not search through when looking for files inside the `content` folder. See [[private pages]] for more details. -- `defaultDateType`: whether to use created, modified, or published as the default date to display on pages and page listings. -- `theme`: configure how the site looks. - - `cdnCaching`: If `true` (default), use Google CDN to cache the fonts. This will generally will be faster. Disable (`false`) this if you want Quartz to download the fonts to be self-contained. - - `typography`: what fonts to use. Any font available on [Google Fonts](https://fonts.google.com/) works here. - - `header`: Font to use for headers - - `code`: Font for inline and block quotes. - - `body`: Font for everything - - `colors`: controls the theming of the site. - - `light`: page background - - `lightgray`: borders - - `gray`: graph links, heavier borders - - `darkgray`: body text - - `dark`: header text and icons - - `secondary`: link colour, current [[graph view|graph]] node - - `tertiary`: hover states and visited [[graph view|graph]] nodes - - `highlight`: internal link background, highlighted text, [[syntax highlighting|highlighted lines of code]] - -## Plugins - -You can think of Quartz plugins as a series of transformations over content. - -![[quartz transform pipeline.png]] - -```ts title="quartz.config.ts" -plugins: { - transformers: [...], - filters: [...], - emitters: [...], -} -``` - -- [[tags/plugin/transformer|Transformers]] **map** over content (e.g. parsing frontmatter, generating a description) -- [[tags/plugin/filter|Filters]] **filter** content (e.g. filtering out drafts) -- [[tags/plugin/emitter|Emitters]] **reduce** over content (e.g. creating an RSS feed or pages that list all files with a specific tag) - -You can customize the behaviour of Quartz by adding, removing and reordering plugins in the `transformers`, `filters` and `emitters` fields. - -> [!note] -> Each node is modified by every transformer _in order_. Some transformers are position sensitive, so you may need to pay particular attention to whether they need to come before or after certain other plugins. - -You should take care to add the plugin to the right entry corresponding to its plugin type. For example, to add the [[ExplicitPublish]] plugin (a [[tags/plugin/filter|Filter]]), you would add the following line: - -```ts title="quartz.config.ts" -filters: [ - ... - Plugin.ExplicitPublish(), - ... -], -``` - -To remove a plugin, you should remove all occurrences of it in the `quartz.config.ts`. - -To customize plugins further, some plugins may also have their own configuration settings that you can pass in. If you do not pass in a configuration, the plugin will use its default settings. - -For example, the [[plugins/Latex|Latex]] plugin allows you to pass in a field specifying the `renderEngine` to choose between Katex and MathJax. - -```ts title="quartz.config.ts" -transformers: [ - Plugin.FrontMatter(), // use default options - Plugin.Latex({ renderEngine: "katex" }), // set some custom options -] -``` - -Some plugins are included by default in the[ `quartz.config.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz.config.ts), but there are more available. - -You can see a list of all plugins and their configuration options [[tags/plugin|here]]. - -If you'd like to make your own plugins, see the [[making plugins|making custom plugins]] guide. diff --git a/docs/features/Docker Support.md b/docs/features/Docker Support.md deleted file mode 100644 index cf73b7fc..00000000 --- a/docs/features/Docker Support.md +++ /dev/null @@ -1,7 +0,0 @@ -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 .) -``` diff --git a/docs/features/Latex.md b/docs/features/Latex.md deleted file mode 100644 index b2bdb2df..00000000 --- a/docs/features/Latex.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: LaTeX -tags: - - feature/transformer ---- - -Quartz uses [Katex](https://katex.org/) by default to typeset both inline and block math expressions at build time. - -## Syntax - -### Block Math - -Block math can be rendered by delimiting math expression with `$$`. - -``` -$$ -f(x) = \int_{-\infty}^\infty - f\hat(\xi),e^{2 \pi i \xi x} - \,d\xi -$$ -``` - -$$ -f(x) = \int_{-\infty}^\infty - f\hat(\xi),e^{2 \pi i \xi x} - \,d\xi -$$ - -$$ -\begin{aligned} -a &= b + c \\ &= e + f \\ -\end{aligned} -$$ - -$$ -\begin{bmatrix} -1 & 2 & 3 \\ -a & b & c -\end{bmatrix} -$$ - -> [!warn] -> Due to limitations in the [underlying parsing library](https://github.com/remarkjs/remark-math), block math in Quartz requires the `$$` delimiters to be on newlines like above. - -### Inline Math - -Similarly, inline math can be rendered by delimiting math expression with a single `$`. For example, `$e^{i\pi} = -1$` produces $e^{i\pi} = -1$ - -### Escaping symbols - -There will be cases where you may have more than one `$` in a paragraph at once which may accidentally trigger MathJax/Katex. - -To get around this, you can escape the dollar sign by doing `\$` instead. - -For example: - -- Incorrect: `I have $1 and you have $2` produces I have $1 and you have $2 -- Correct: `I have \$1 and you have \$2` produces I have \$1 and you have \$2 - -### Using mhchem - -Add the following import to the top of `quartz/plugins/transformers/latex.ts` (before all the other -imports): - -```ts title="quartz/plugins/transformers/latex.ts" -import "katex/contrib/mhchem" -``` - -## Customization - -Latex parsing is a functionality of the [[plugins/Latex|Latex]] plugin. See the plugin page for customization options. diff --git a/docs/features/Mermaid diagrams.md b/docs/features/Mermaid diagrams.md deleted file mode 100644 index 9cc40891..00000000 --- a/docs/features/Mermaid diagrams.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Mermaid Diagrams" -tags: - - feature/transformer ---- - -Quartz supports Mermaid which allows you to add diagrams and charts to your notes. Mermaid supports a range of diagrams, such as [flow charts](https://mermaid.js.org/syntax/flowchart.html), [sequence diagrams](https://mermaid.js.org/syntax/sequenceDiagram.html), and [timelines](https://mermaid.js.org/syntax/timeline.html). This is enabled as a part of [[Obsidian compatibility]] and can be configured and enabled/disabled from that plugin. - -By default, Quartz will render Mermaid diagrams to match the site theme. - -> [!warning] -> Wondering why Mermaid diagrams may not be showing up even if you have them enabled? You may need to reorder your plugins so that [[ObsidianFlavoredMarkdown]] is _after_ [[SyntaxHighlighting]]. - -## Syntax - -To add a Mermaid diagram, create a mermaid code block. - -```` -```mermaid -sequenceDiagram - Alice->>+John: Hello John, how are you? - Alice->>+John: John, can you hear me? - John-->>-Alice: Hi Alice, I can hear you! - John-->>-Alice: I feel great! -``` -```` - -```mermaid -sequenceDiagram - Alice->>+John: Hello John, how are you? - Alice->>+John: John, can you hear me? - John-->>-Alice: Hi Alice, I can hear you! - John-->>-Alice: I feel great! -``` diff --git a/docs/features/Obsidian compatibility.md b/docs/features/Obsidian compatibility.md deleted file mode 100644 index e469f486..00000000 --- a/docs/features/Obsidian compatibility.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Obsidian Compatibility" -tags: - - feature/transformer ---- - -Quartz was originally designed as a tool to publish Obsidian vaults as websites. Even as the scope of Quartz has widened over time, it hasn't lost the ability to seamlessly interoperate with Obsidian. - -By default, Quartz ships with the [[ObsidianFlavoredMarkdown]] plugin, which is a transformer plugin that adds support for [Obsidian Flavored Markdown](https://help.obsidian.md/Editing+and+formatting/Obsidian+Flavored+Markdown). This includes support for features like [[wikilinks]] and [[Mermaid diagrams]]. - -It also ships with support for [frontmatter parsing](https://help.obsidian.md/Editing+and+formatting/Properties) with the same fields that Obsidian uses through the [[Frontmatter]] transformer plugin. - -Finally, Quartz also provides [[CrawlLinks]] plugin, which allows you to customize Quartz's link resolution behaviour to match Obsidian. - -## Configuration - -This functionality is provided by the [[ObsidianFlavoredMarkdown]], [[Frontmatter]] and [[CrawlLinks]] plugins. See the plugin pages for customization options. diff --git a/docs/features/OxHugo compatibility.md b/docs/features/OxHugo compatibility.md deleted file mode 100644 index e2205114..00000000 --- a/docs/features/OxHugo compatibility.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "OxHugo Compatibility" -tags: - - feature/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 the [[OxHugoFlavoredMarkdown]] plugin. Even though this 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 - -This functionality is provided by the [[OxHugoFlavoredMarkdown]] plugin. See the plugin page for customization options. diff --git a/docs/features/RSS Feed.md b/docs/features/RSS Feed.md deleted file mode 100644 index ed4138df..00000000 --- a/docs/features/RSS Feed.md +++ /dev/null @@ -1,5 +0,0 @@ -Quartz emits an RSS feed for all the content on your site by generating an `index.xml` file that RSS readers can subscribe to. Because of the RSS spec, this requires the `baseUrl` property in your [[configuration]] to be set properly for RSS readers to pick it up properly. - -## Configuration - -This functionality is provided by the [[ContentIndex]] plugin. See the plugin page for customization options. diff --git a/docs/features/SPA Routing.md b/docs/features/SPA Routing.md deleted file mode 100644 index 3004af97..00000000 --- a/docs/features/SPA Routing.md +++ /dev/null @@ -1,7 +0,0 @@ -Single-page-app style rendering. This prevents flashes of unstyled content and improves the smoothness of Quartz. - -Under the hood, this is done by hijacking page navigations and instead fetching the HTML via a `GET` request and then diffing and selectively replacing parts of the page using [micromorph](https://github.com/natemoo-re/micromorph). This allows us to change the content of the page without fully refreshing the page, reducing the amount of content that the browser needs to load. - -## Configuration - -- Disable SPA Routing: set the `enableSPA` field of the [[configuration]] in `quartz.config.ts` to be `false`. diff --git a/docs/features/backlinks.md b/docs/features/backlinks.md deleted file mode 100644 index f558f4a5..00000000 --- a/docs/features/backlinks.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Backlinks -tags: - - component ---- - -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. - -## Customization - -- Removing backlinks: delete all usages of `Component.Backlinks()` from `quartz.layout.ts`. -- Component: `quartz/components/Backlinks.tsx` -- Style: `quartz/components/styles/backlinks.scss` -- Script: `quartz/components/scripts/search.inline.ts` diff --git a/docs/features/breadcrumbs.md b/docs/features/breadcrumbs.md deleted file mode 100644 index a7018583..00000000 --- a/docs/features/breadcrumbs.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -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, // whether 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` diff --git a/docs/features/callouts.md b/docs/features/callouts.md deleted file mode 100644 index 4caeeb4c..00000000 --- a/docs/features/callouts.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Callouts -tags: - - feature/transformer ---- - -Quartz supports the same Admonition-callout syntax as Obsidian. - -This includes - -- 12 Distinct callout types (each with several aliases) -- Collapsable callouts - -``` -> [!info] Title -> This is a callout! -``` - -See [documentation on supported types and syntax here](https://help.obsidian.md/Editing+and+formatting/Callouts). - -> [!warning] -> Wondering why callouts may not be showing up even if you have them enabled? You may need to reorder your plugins so that [[ObsidianFlavoredMarkdown]] is _after_ [[SyntaxHighlighting]]. - -## Customization - -The callouts are a functionality of the [[ObsidianFlavoredMarkdown]] plugin. See the plugin page for how to enable or disable them. - -You can edit the icons by customizing `quartz/styles/callouts.scss`. - -### Add custom callouts - -By default, custom callouts are handled by applying the `note` style. To make fancy ones, you have to add these lines to `custom.scss`. - -```scss title="quartz/styles/custom.scss" -.callout { - &[data-callout="custom"] { - --color: #customcolor; - --border: #custombordercolor; - --bg: #custombg; - --callout-icon: url("data:image/svg+xml; utf8, "); //SVG icon code - } -} -``` - -> [!warning] -> Don't forget to ensure that the SVG is URL encoded before putting it in the CSS. You can use tools like [this one](https://yoksel.github.io/url-encoder/) to help you do that. - -## Showcase - -> [!info] -> Default title - -> [!question]+ Can callouts be _nested_? -> -> > [!todo]- Yes!, they can. And collapsed! -> > -> > > [!example] You can even use multiple layers of nesting. - -> [!note] -> Aliases: "note" - -> [!abstract] -> Aliases: "abstract", "summary", "tldr" - -> [!info] -> Aliases: "info" - -> [!todo] -> Aliases: "todo" - -> [!tip] -> Aliases: "tip", "hint", "important" - -> [!success] -> Aliases: "success", "check", "done" - -> [!question] -> Aliases: "question", "help", "faq" - -> [!warning] -> Aliases: "warning", "attention", "caution" - -> [!failure] -> Aliases: "failure", "missing", "fail" - -> [!danger] -> Aliases: "danger", "error" - -> [!bug] -> Aliases: "bug" - -> [!example] -> Aliases: "example" - -> [!quote] -> Aliases: "quote", "cite" diff --git a/docs/features/darkmode.md b/docs/features/darkmode.md deleted file mode 100644 index dff75b44..00000000 --- a/docs/features/darkmode.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Darkmode" -tags: - - component ---- - -Quartz supports darkmode out of the box that respects the user's theme preference. Any future manual toggles of the darkmode switch will be saved in the browser's local storage so it can be persisted across future page loads. - -## Customization - -- Removing darkmode: delete all usages of `Component.Darkmode()` from `quartz.layout.ts`. -- Component: `quartz/components/Darkmode.tsx` -- Style: `quartz/components/styles/darkmode.scss` -- Script: `quartz/components/scripts/darkmode.inline.ts` - -You can also listen to the `themechange` event to perform any custom logic when the theme changes. - -```js -document.addEventListener("themechange", (e) => { - console.log("Theme changed to " + e.detail.theme) // either "light" or "dark" - // your logic here -}) -``` diff --git a/docs/features/explorer.md b/docs/features/explorer.md deleted file mode 100644 index 95878f78..00000000 --- a/docs/features/explorer.md +++ /dev/null @@ -1,319 +0,0 @@ ---- -title: "Explorer" -tags: - - component ---- - -Quartz features an explorer that allows you to navigate all files and folders on your site. It supports nested folders and is highly customizable. - -By default, it shows all folders and files on your page. To display the explorer in a different spot, you can edit the [[layout]]. - -Display names for folders get determined by the `title` frontmatter field in `folder/index.md` (more detail in [[authoring content | Authoring Content]]). If this file does not exist or does not contain frontmatter, the local folder name will be used instead. - -> [!info] -> The explorer uses local storage by default to save the state of your explorer. This is done to ensure a smooth experience when navigating to different pages. -> -> To clear/delete the explorer state from local storage, delete the `fileTree` entry (guide on how to delete a key from local storage in chromium based browsers can be found [here](https://docs.devolutions.net/kb/general-knowledge-base/clear-browser-local-storage/clear-chrome-local-storage/)). You can disable this by passing `useSavedState: false` as an argument. - -## Customization - -Most configuration can be done by passing in options to `Component.Explorer()`. - -For example, here's what the default configuration looks like: - -```typescript title="quartz.layout.ts" -Component.Explorer({ - title: "Explorer", // title of the explorer component - folderClickBehavior: "collapse", // what happens when you click a folder ("link" to navigate to folder page on click or "collapse" to collapse folder on click) - folderDefaultState: "collapsed", // default state of folders ("collapsed" or "open") - useSavedState: true, // whether to use local storage to save "state" (which folders are opened) of explorer - // Sort order: folders first, then files. Sort folders and files alphabetically - sortFn: (a, b) => { - ... // default implementation shown later - }, - filterFn: filterFn: (node) => node.name !== "tags", // filters out 'tags' folder - mapFn: undefined, - // what order to apply functions in - order: ["filter", "map", "sort"], -}) -``` - -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. - -Want to customize it even more? - -- Removing explorer: remove `Component.Explorer()` from `quartz.layout.ts` - - (optional): After removing the explorer component, you can move the [[table of contents | Table of Contents]] component back to the `left` part of the layout -- Changing `sort`, `filter` and `map` behavior: explained in [[#Advanced customization]] -- Component: - - Wrapper (Outer component, generates file tree, etc): `quartz/components/Explorer.tsx` - - Explorer node (recursive, either a folder or a file): `quartz/components/ExplorerNode.tsx` -- Style: `quartz/components/styles/explorer.scss` -- Script: `quartz/components/scripts/explorer.inline.ts` - -## Advanced customization - -This component allows you to fully customize all of its behavior. You can pass a custom `sort`, `filter` and `map` function. -All functions you can pass work with the `FileNode` class, which has the following properties: - -```ts title="quartz/components/ExplorerNode.tsx" {2-5} -export class FileNode { - children: FileNode[] // children of current node - name: string // last part of slug - displayName: string // what actually should be displayed in the explorer - file: QuartzPluginData | null // if node is a file, this is the file's metadata. See `QuartzPluginData` for more detail - depth: number // depth of current node - - ... // rest of implementation -} -``` - -Every function you can pass is optional. By default, only a `sort` function will be used: - -```ts title="Default sort function" -// Sort order: folders first, then files. Sort folders and files alphabetically -Component.Explorer({ - sortFn: (a, b) => { - if ((!a.file && !b.file) || (a.file && b.file)) { - // sensitivity: "base": Only strings that differ in base letters compare as unequal. Examples: a ≠ b, a = á, a = A - // numeric: true: Whether numeric collation should be used, such that "1" < "2" < "10" - return a.displayName.localeCompare(b.displayName, undefined, { - numeric: true, - sensitivity: "base", - }) - } - if (a.file && !b.file) { - return 1 - } else { - return -1 - } - }, -}) -``` - ---- - -You can pass your own functions for `sortFn`, `filterFn` and `mapFn`. All functions will be executed in the order provided by the `order` option (see [[#Customization]]). These functions behave similarly to their `Array.prototype` counterpart, except they modify the entire `FileNode` tree in place instead of returning a new one. - -For more information on how to use `sort`, `filter` and `map`, you can check [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort), [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) and [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). - -Type definitions look like this: - -```ts -sortFn: (a: FileNode, b: FileNode) => number -filterFn: (node: FileNode) => boolean -mapFn: (node: FileNode) => void -``` - -> [!tip] -> You can check if a `FileNode` is a folder or a file like this: -> -> ```ts -> if (node.file) { -> // node is a file -> } else { -> // node is a folder -> } -> ``` - -## Basic examples - -These examples show the basic usage of `sort`, `map` and `filter`. - -### Use `sort` to put files first - -Using this example, the explorer will alphabetically sort everything, but put all **files** above all **folders**. - -```ts title="quartz.layout.ts" -Component.Explorer({ - sortFn: (a, b) => { - if ((!a.file && !b.file) || (a.file && b.file)) { - return a.displayName.localeCompare(b.displayName) - } - if (a.file && !b.file) { - return -1 - } else { - return 1 - } - }, -}) -``` - -### Change display names (`map`) - -Using this example, the display names of all `FileNodes` (folders + files) will be converted to full upper case. - -```ts title="quartz.layout.ts" -Component.Explorer({ - mapFn: (node) => { - node.displayName = node.displayName.toUpperCase() - }, -}) -``` - -### Remove list of elements (`filter`) - -Using this example, you can remove elements from your explorer by providing an array of folders/files using the `omit` set. - -```ts title="quartz.layout.ts" -Component.Explorer({ - filterFn: (node) => { - // set containing names of everything you want to filter out - const omit = new Set(["authoring content", "tags", "hosting"]) - return !omit.has(node.name.toLowerCase()) - }, -}) -``` - -You can customize this by changing the entries of the `omit` set. Simply add all folder or file names you want to remove. - -### Remove files by tag - -You can access the frontmatter of a file by `node.file?.frontmatter?`. This allows you to filter out files based on their frontmatter, for example by their tags. - -```ts title="quartz.layout.ts" -Component.Explorer({ - filterFn: (node) => { - // exclude files with the tag "explorerexclude" - return node.file?.frontmatter?.tags?.includes("explorerexclude") !== true - }, -}) -``` - -### Show every element in explorer - -To override the default filter function that removes the `tags` folder from the explorer, you can set the filter function to `undefined`. - -```ts title="quartz.layout.ts" -Component.Explorer({ - filterFn: undefined, // apply no filter function, every file and folder will visible -}) -``` - -## Advanced examples - -> [!tip] -> When writing more complicated functions, the `layout` file can start to look very cramped. -> You can fix this by defining your functions in another file. -> -> ```ts title="functions.ts" -> import { Options } from "./quartz/components/ExplorerNode" -> export const mapFn: Options["mapFn"] = (node) => { -> // implement your function here -> } -> export const filterFn: Options["filterFn"] = (node) => { -> // implement your function here -> } -> export const sortFn: Options["sortFn"] = (a, b) => { -> // implement your function here -> } -> ``` -> -> You can then import them like this: -> -> ```ts title="quartz.layout.ts" -> import { mapFn, filterFn, sortFn } from "./functions.ts" -> Component.Explorer({ -> mapFn: mapFn, -> filterFn: filterFn, -> sortFn: sortFn, -> }) -> ``` - -### Add emoji prefix - -To add emoji prefixes (📁 for folders, 📄 for files), you could use a map function like this: - -```ts title="quartz.layout.ts" -Component.Explorer({ - mapFn: (node) => { - // dont change name of root node - if (node.depth > 0) { - // set emoji for file/folder - if (node.file) { - node.displayName = "📄 " + node.displayName - } else { - node.displayName = "📁 " + node.displayName - } - } - }, -}) -``` - -### Putting it all together - -In this example, we're going to customize the explorer by using functions from examples above to [[#Add emoji prefix | add emoji prefixes]], [[#remove-list-of-elements-filter| filter out some folders]] and [[#use-sort-to-put-files-first | sort with files above folders]]. - -```ts title="quartz.layout.ts" -Component.Explorer({ - filterFn: sampleFilterFn, - mapFn: sampleMapFn, - sortFn: sampleSortFn, - order: ["filter", "sort", "map"], -}) -``` - -Notice how we customized the `order` array here. This is done because the default order applies the `sort` function last. While this normally works well, it would cause unintended behavior here, since we changed the first characters of all display names. In our example, `sort` would be applied based off the emoji prefix instead of the first _real_ character. - -To fix this, we just changed around the order and apply the `sort` function before changing the display names in the `map` function. - -### Use `sort` with pre-defined sort order - -Here's another example where a map containing file/folder names (as slugs) is used to define the sort order of the explorer in quartz. All files/folders that aren't listed inside of `nameOrderMap` will appear at the top of that folders hierarchy level. - -It's also worth mentioning, that the smaller the number set in `nameOrderMap`, the higher up the entry will be in the explorer. Incrementing every folder/file by 100, makes ordering files in their folders a lot easier. Lastly, this example still allows you to use a `mapFn` or frontmatter titles to change display names, as it uses slugs for `nameOrderMap` (which is unaffected by display name changes). - -```ts title="quartz.layout.ts" -Component.Explorer({ - sortFn: (a, b) => { - const nameOrderMap: Record = { - "poetry-folder": 100, - "essay-folder": 200, - "research-paper-file": 201, - "dinosaur-fossils-file": 300, - "other-folder": 400, - } - - let orderA = 0 - let orderB = 0 - - if (a.file && a.file.slug) { - orderA = nameOrderMap[a.file.slug] || 0 - } else if (a.name) { - orderA = nameOrderMap[a.name] || 0 - } - - if (b.file && b.file.slug) { - orderB = nameOrderMap[b.file.slug] || 0 - } else if (b.name) { - orderB = nameOrderMap[b.name] || 0 - } - - return orderA - orderB - }, -}) -``` - -For reference, this is how the quartz explorer window would look like with that example: - -``` -📖 Poetry Folder -📑 Essay Folder - ⚗️ Research Paper File -🦴 Dinosaur Fossils File -🔮 Other Folder -``` - -And this is how the file structure would look like: - -``` -index.md -poetry-folder - index.md -essay-folder - index.md - research-paper-file.md -dinosaur-fossils-file.md -other-folder - index.md -``` diff --git a/docs/features/folder and tag listings.md b/docs/features/folder and tag listings.md deleted file mode 100644 index d330f147..00000000 --- a/docs/features/folder and tag listings.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Folder and Tag Listings -tags: - - feature/emitter ---- - -Quartz emits listing pages for any folders and tags you have. - -## Folder Listings - -Quartz will generate an index page for all the pages under that folder. This includes any content that is multiple levels deep. - -Additionally, Quartz will also generate pages for subfolders. Say you have a note in a nested folder `content/abc/def/note.md`. Then Quartz would generate a page for all the notes under `abc` _and_ a page for all the notes under `abc/def`. - -You can link to the folder listing by referencing its name, plus a trailing slash, like this: `[[advanced/]]` (results in [[advanced/]]). - -By default, Quartz will title the page `Folder: ` and no description. You can override this by creating an `index.md` file in the folder with the `title` [[authoring content#Syntax|frontmatter]] field. Any content you write in this file will also be used in the folder description. - -For example, for the folder `content/posts`, you can add another file `content/posts/index.md` to add a specific description for it. - -## Tag Listings - -Quartz will also create an index page for each unique tag in your vault and render a list of all notes with that tag. - -Quartz also supports tag hierarchies as well (e.g. `plugin/emitter`) and will also render a separate tag page for each level of the tag hierarchy. It will also create a default global tag index page at `/tags` that displays a list of all the tags in your Quartz. - -You can link to the tag listing by referencing its name with a `tag/` prefix, like this: `[[tags/plugin]]` (results in [[tags/plugin]]). - -As with folder listings, you can also provide a description and title for a tag page by creating a file for each tag. For example, if you wanted to create a custom description for the #component tag, you would create a file at `content/tags/component.md` with a title and description. - -## Customization - -The folder listings are a functionality of the [[FolderPage]] plugin, the tag listings of the [[TagPage]] plugin. See the plugin pages for customization options. diff --git a/docs/features/full-text search.md b/docs/features/full-text search.md deleted file mode 100644 index 85ec0300..00000000 --- a/docs/features/full-text search.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Full-text Search -tags: - - component ---- - -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. - -It can be opened by either clicking on the search bar or pressing `⌘`/`ctrl` + `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. - -To search content by tags, you can either press `⌘`/`ctrl` + `shift` + `K` or start your query with `#` (e.g. `#components`). - -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). You are also able to navigate search results using `ArrowUp` and `ArrowDown`. - -> [!info] -> Search requires the `ContentIndex` emitter plugin to be present in the [[configuration]]. - -### Indexing Behaviour - -By default, it indexes every page on the site with **Markdown syntax removed**. This means link URLs for instance are not indexed. - -It properly tokenizes Chinese, Korean, and Japenese characters and constructs separate indexes for the title, content and tags, weighing title matches above content matches. - -## Customization - -- Removing search: delete all usages of `Component.Search()` from `quartz.layout.ts`. -- Component: `quartz/components/Search.tsx` -- Style: `quartz/components/styles/search.scss` -- Script: `quartz/components/scripts/search.inline.ts` - - You can edit `contextWindowWords`, `numSearchResults` or `numTagResults` to suit your needs diff --git a/docs/features/graph view.md b/docs/features/graph view.md deleted file mode 100644 index 4f905c78..00000000 --- a/docs/features/graph view.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "Graph View" -tags: - - component ---- - -Quartz features a graph-view that can show both a local graph view and a global graph view. - -- The local graph view shows files that either link to the current file or are linked from the current file. In other words, it shows all notes that are _at most_ one hop away. -- The global graph view can be toggled by clicking the graph icon on the top-right of the local graph view. It shows _all_ the notes in your graph and how they connect to each other. - -By default, the node radius is proportional to the total number of incoming and outgoing internal links from that file. - -Additionally, similar to how browsers highlight visited links a different colour, the graph view will also show nodes that you have visited in a different colour. - -> [!info] -> Graph View requires the `ContentIndex` emitter plugin to be present in the [[configuration]]. - -## Customization - -Most configuration can be done by passing in options to `Component.Graph()`. - -For example, here's what the default configuration looks like: - -```typescript title="quartz.layout.ts" -Component.Graph({ - localGraph: { - drag: true, // whether to allow panning the view around - zoom: true, // whether to allow zooming in and out - depth: 1, // how many hops of notes to display - scale: 1.1, // default view scale - repelForce: 0.5, // how much nodes should repel each other - centerForce: 0.3, // how much force to use when trying to center the nodes - linkDistance: 30, // how long should the links be by default? - fontSize: 0.6, // what size should the node labels be? - opacityScale: 1, // how quickly do we fade out the labels when zooming out? - removeTags: [], // what tags to remove from the graph - showTags: true, // whether to show tags in the graph - }, - globalGraph: { - drag: true, - zoom: true, - depth: -1, - scale: 0.9, - repelForce: 0.5, - centerForce: 0.3, - linkDistance: 30, - fontSize: 0.6, - opacityScale: 1, - removeTags: [], // what tags to remove from the graph - showTags: true, // whether to show tags in the graph - }, -}) -``` - -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. - -Want to customize it even more? - -- Removing graph view: delete all usages of `Component.Graph()` from `quartz.layout.ts`. -- Component: `quartz/components/Graph.tsx` -- Style: `quartz/components/styles/graph.scss` -- Script: `quartz/components/scripts/graph.inline.ts` diff --git a/docs/features/i18n.md b/docs/features/i18n.md deleted file mode 100644 index 57547dda..00000000 --- a/docs/features/i18n.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Internationalization ---- - -Internationalization allows users to translate text in the Quartz interface into various supported languages without needing to make extensive code changes. This can be changed via the `locale` [[configuration]] field in `quartz.config.ts`. - -The locale field generally follows a certain format: `{language}-{REGION}` - -- `{language}` is usually a [2-letter lowercase language code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes). -- `{REGION}` is usually a [2-letter uppercase region code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - -> [!tip] Interested in contributing? -> We [gladly welcome translation PRs](https://github.com/jackyzha0/quartz/tree/v4/quartz/i18n/locales)! To contribute a translation, do the following things: -> -> 1. In the `quartz/i18n/locales` folder, copy the `en-US.ts` file. -> 2. Rename it to `{language}-{REGION}.ts` so it matches a locale of the format shown above. -> 3. Fill in the translations! -> 4. Add the entry under `TRANSLATIONS` in `quartz/i18n/index.ts`. diff --git a/docs/features/popover previews.md b/docs/features/popover previews.md deleted file mode 100644 index 06660475..00000000 --- a/docs/features/popover previews.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Popover Previews ---- - -Like Wikipedia, when you hover over a link in Quartz, there is a popup of a page preview that you can scroll to see the entire content. Links to headers will also scroll the popup to show that specific header in view. - -By default, Quartz only fetches previews for pages inside your vault due to [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). It does this by selecting all HTML elements with the `popover-hint` class. For most pages, this includes the page title, page metadata like words and time to read, tags, and the actual page content. - -When [[creating components|creating your own components]], you can include this `popover-hint` class to also include it in the popover. - -Similar to Obsidian, [[quartz layout.png|images referenced using wikilinks]] can also be viewed as popups. - -## Configuration - -- Remove popovers: set the `enablePopovers` field in `quartz.config.ts` to be `false`. -- Style: `quartz/components/styles/popover.scss` -- Script: `quartz/components/scripts/popover.inline.ts` diff --git a/docs/features/private pages.md b/docs/features/private pages.md deleted file mode 100644 index 1e8f8aa2..00000000 --- a/docs/features/private pages.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Private Pages -tags: - - feature/filter ---- - -There may be some notes you want to avoid publishing as a website. Quartz supports this through two mechanisms which can be used in conjunction: - -## Filter Plugins - -[[making plugins#Filters|Filter plugins]] are plugins that filter out content based off of certain criteria. By default, Quartz uses the [[RemoveDrafts]] plugin which filters out any note that has `draft: true` in the frontmatter. - -If you'd like to only publish a select number of notes, you can instead use [[ExplicitPublish]] which will filter out all notes except for any that have `publish: true` in the frontmatter. - -> [!warning] -> Regardless of the filter plugin used, **all non-markdown files will be emitted and available publically in the final build.** This includes files such as images, voice recordings, PDFs, etc. One way to prevent this and still be able to embed local images is to create a folder specifically for public media and add the following two patterns to the ignorePatterns array. -> -> `"!(PublicMedia)**/!(*.md)", "!(*.md)"` - -## `ignorePatterns` - -This is a field in `quartz.config.ts` under the main [[configuration]] which allows you to specify a list of patterns to effectively exclude from parsing all together. Any valid [fast-glob](https://github.com/mrmlnc/fast-glob#pattern-syntax) pattern works here. - -> [!note] -> Bash's glob syntax is slightly different from fast-glob's and using bash's syntax may lead to unexpected results. - -Common examples include: - -- `some/folder`: exclude the entire of `some/folder` -- `*.md`: exclude all files with a `.md` extension -- `!*.md` exclude all files that _don't_ have a `.md` extension -- `**/private`: exclude any files or folders named `private` at any level of nesting - -> [!warning] -> Marking something as private via either a plugin or through the `ignorePatterns` pattern will only prevent a page from being included in the final built site. If your GitHub repository is public, also be sure to include an ignore for those in the `.gitignore` of your Quartz. See the `git` [documentation](https://git-scm.com/docs/gitignore#_pattern_format) for more information. diff --git a/docs/features/recent notes.md b/docs/features/recent notes.md deleted file mode 100644 index 9236b7ce..00000000 --- a/docs/features/recent notes.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Recent Notes -tags: component ---- - -Quartz can generate a list of recent notes based on some filtering and sorting criteria. Though this component isn't included in any [[layout]] by default, you can add it by using `Component.RecentNotes` in `quartz.layout.ts`. - -## Customization - -- Changing the title from "Recent notes": pass in an additional parameter to `Component.RecentNotes({ title: "Recent writing" })` -- Changing the number of recent notes: pass in an additional parameter to `Component.RecentNotes({ limit: 5 })` -- Show a 'see more' link: pass in an additional parameter to `Component.RecentNotes({ linkToMore: "tags/components" })`. This field should be a full slug to a page that exists. -- Customize filtering: pass in an additional parameter to `Component.RecentNotes({ filter: someFilterFunction })`. The filter function should be a function that has the signature `(f: QuartzPluginData) => boolean`. -- Customize sorting: pass in an additional parameter to `Component.RecentNotes({ sort: someSortFunction })`. By default, Quartz will sort by date and then tie break lexographically. The sort function should be a function that has the signature `(f1: QuartzPluginData, f2: QuartzPluginData) => number`. See `byDateAndAlphabetical` in `quartz/components/PageList.tsx` for an example. -- Component: `quartz/components/RecentNotes.tsx` -- Style: `quartz/components/styles/recentNotes.scss` diff --git a/docs/features/syntax highlighting.md b/docs/features/syntax highlighting.md deleted file mode 100644 index 16fef257..00000000 --- a/docs/features/syntax highlighting.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Syntax Highlighting -tags: - - feature/transformer ---- - -Syntax highlighting in Quartz is completely done at build-time. This means that Quartz only ships pre-calculated CSS to highlight the right words so there is no heavy client-side bundle that does the syntax highlighting. - -And, unlike some client-side highlighters, it has a full TextMate parser grammar instead of using Regexes, allowing for highly accurate code highlighting. - -In short, it generates HTML that looks exactly like your code in an editor like VS Code. Under the hood, it's powered by [Rehype Pretty Code](https://rehype-pretty-code.netlify.app/) which uses [Shiki](https://github.com/shikijs/shiki). - -> [!warning] -> Syntax highlighting does have an impact on build speed if you have a lot of code snippets in your notes. - -## Formatting - -Text inside `backticks` on a line will be formatted like code. - -```` -```ts -export function trimPathSuffix(fp: string): string { - fp = clientSideSlug(fp) - let [cleanPath, anchor] = fp.split("#", 2) - anchor = anchor === undefined ? "" : "#" + anchor - - return cleanPath + anchor -} -``` -```` - -```ts -export function trimPathSuffix(fp: string): string { - fp = clientSideSlug(fp) - let [cleanPath, anchor] = fp.split("#", 2) - anchor = anchor === undefined ? "" : "#" + anchor - - return cleanPath + anchor -} -``` - -### Titles - -Add a file title to your code block, with text inside double quotes (`""`): - -```` -```js title="..." - -``` -```` - -```ts title="quartz/path.ts" -export function trimPathSuffix(fp: string): string { - fp = clientSideSlug(fp) - let [cleanPath, anchor] = fp.split("#", 2) - anchor = anchor === undefined ? "" : "#" + anchor - - return cleanPath + anchor -} -``` - -### Line highlighting - -Place a numeric range inside `{}`. - -```` -```js {1-3,4} - -``` -```` - -```ts {2-3,6} -export function trimPathSuffix(fp: string): string { - fp = clientSideSlug(fp) - let [cleanPath, anchor] = fp.split("#", 2) - anchor = anchor === undefined ? "" : "#" + anchor - - return cleanPath + anchor -} -``` - -### Word highlighting - -A series of characters, like a literal regex. - -```` -```js /useState/ -const [age, setAge] = useState(50); -const [name, setName] = useState('Taylor'); -``` -```` - -```js /useState/ -const [age, setAge] = useState(50) -const [name, setName] = useState("Taylor") -``` - -### Line numbers - -Syntax highlighting has line numbers configured automatically. If you want to start line numbers at a specific number, use `showLineNumbers{number}`: - -```` -```js showLineNumbers{number} - -``` -```` - -```ts showLineNumbers{20} -export function trimPathSuffix(fp: string): string { - fp = clientSideSlug(fp) - let [cleanPath, anchor] = fp.split("#", 2) - anchor = anchor === undefined ? "" : "#" + anchor - - return cleanPath + anchor -} -``` - -### Escaping code blocks - -You can format a codeblock inside of a codeblock by wrapping it with another level of backtick fences that has one more backtick than the previous fence. - -````` -```` -```js /useState/ -const [age, setAge] = useState(50); -const [name, setName] = useState('Taylor'); -``` -```` -````` - -## Customization - -Syntax highlighting is a functionality of the [[SyntaxHighlighting]] plugin. See the plugin page for customization options. diff --git a/docs/features/table of contents.md b/docs/features/table of contents.md deleted file mode 100644 index 4ecccc93..00000000 --- a/docs/features/table of contents.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Table of Contents" -tags: - - component - - feature/transformer ---- - -Quartz can automatically generate a table of contents (TOC) from a list of headings on each page. It will also show you your current scrolling position on the page by highlighting headings you've scrolled through with a different color. - -You can hide the TOC on a page by adding `enableToc: false` to the frontmatter for that page. - -By default, the TOC shows all headings from H1 (`# Title`) to H3 (`### Title`) and is only displayed if there is more than one heading on the page. - -## Customization - -The table of contents is a functionality of the [[TableOfContents]] plugin. See the plugin page for more customization options. - -It also needs the `TableOfContents` component, which is displayed in the right sidebar by default. You can change this by customizing the [[layout]]. The TOC component can be configured with the `layout` parameter, which can either be `modern` (default) or `legacy`. diff --git a/docs/features/upcoming features.md b/docs/features/upcoming features.md deleted file mode 100644 index 76adda00..00000000 --- a/docs/features/upcoming features.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -draft: true ---- - -## high priority backlog - -- static dead link detection -- block links: https://help.obsidian.md/Linking+notes+and+files/Internal+links#Link+to+a+block+in+a+note -- note/header/block transcludes: https://help.obsidian.md/Linking+notes+and+files/Embedding+files -- docker support - -## misc backlog - -- breadcrumbs component -- cursor chat extension -- https://giscus.app/ extension -- sidenotes? https://github.com/capnfabs/paperesque -- direct match in search using double quotes -- https://help.obsidian.md/Advanced+topics/Using+Obsidian+URI -- audio/video embed styling -- Canvas -- parse all images in page: use this for page lists if applicable? -- CV mode? with print stylesheet diff --git a/docs/features/wikilinks.md b/docs/features/wikilinks.md deleted file mode 100644 index ad4f2d77..00000000 --- a/docs/features/wikilinks.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Wikilinks ---- - -Wikilinks were pioneered by earlier internet wikis to make it easier to write links across pages without needing to write Markdown or HTML links each time. - -Quartz supports Wikilinks by default and these links are resolved by Quartz using the [[CrawlLinks]] plugin. See the [Obsidian Help page on Internal Links](https://help.obsidian.md/Linking+notes+and+files/Internal+links) for more information on Wikilink syntax. - -This is enabled as a part of [[Obsidian compatibility]] and can be configured and enabled/disabled from that plugin. - -## Syntax - -- `[[Path to file]]`: produces a link to `Path to file.md` (or `Path-to-file.md`) with the text `Path to file` -- `[[Path to file | Here's the title override]]`: produces a link to `Path to file.md` with the text `Here's the title override` -- `[[Path to file#Anchor]]`: produces a link to the anchor `Anchor` in the file `Path to file.md` -- `[[Path to file#^block-ref]]`: produces a link to the specific block `block-ref` in the file `Path to file.md` - -### Embeds - -- `![[Path to image]]`: embeds an image into the page -- `![[Path to image|100x145]]`: embeds an image into the page with dimensions 100px by 145px -- `![[Path to file]]`: transclude an entire page -- `![[Path to file#Anchor]]`: transclude everything under the header `Anchor` -- `![[Path to file#^b15695]]`: transclude block with ID `^b15695` diff --git a/docs/hosting.md b/docs/hosting.md deleted file mode 100644 index eeb93084..00000000 --- a/docs/hosting.md +++ /dev/null @@ -1,252 +0,0 @@ ---- -title: Hosting ---- - -Quartz effectively turns your Markdown files and other resources into a bundle of HTML, JS, and CSS files (a website!). - -However, if you'd like to publish your site to the world, you need a way to host it online. This guide will detail how to deploy with common hosting providers but any service that allows you to deploy static HTML should work as well. - -> [!warning] -> The rest of this guide assumes that you've already created your own GitHub repository for Quartz. If you haven't already, [[setting up your GitHub repository|make sure you do so]]. - -> [!hint] -> Some Quartz features (like [[RSS Feed]] and sitemap generation) require `baseUrl` to be configured properly in your [[configuration]] to work properly. Make sure you set this before deploying! - -## Cloudflare Pages - -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account. -2. In Account Home, select **Workers & Pages** > **Create application** > **Pages** > **Connect to Git**. -3. Select the new GitHub repository that you created and, in the **Set up builds and deployments** section, provide the following information: - -| Configuration option | Value | -| ---------------------- | ------------------ | -| Production branch | `v4` | -| Framework preset | `None` | -| Build command | `npx quartz build` | -| Build output directory | `public` | - -Press "Save and deploy" and Cloudflare should have a deployed version of your site in about a minute. Then, every time you sync your Quartz changes to GitHub, your site should be updated. - -To add a custom domain, check out [Cloudflare's documentation](https://developers.cloudflare.com/pages/platform/custom-domains/). - -> [!warning] -> Cloudflare Pages performs a shallow clone by default, so if you rely on `git` for timestamps, it is recommended that you add `git fetch --unshallow &&` to the beginning of the build command (e.g., `git fetch --unshallow && npx quartz build`). - -## GitHub Pages - -In your local Quartz, create a new file `quartz/.github/workflows/deploy.yml`. - -```yaml title="quartz/.github/workflows/deploy.yml" -name: Deploy Quartz site to GitHub Pages - -on: - push: - branches: - - v4 - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Fetch all history for git info - - uses: actions/setup-node@v3 - with: - node-version: 18.14 - - name: Install Dependencies - run: npm ci - - name: Build Quartz - run: npx quartz build - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: public - - deploy: - needs: build - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 -``` - -Then: - -1. Head to "Settings" tab of your forked repository and in the sidebar, click "Pages". Under "Source", select "GitHub Actions". -2. Commit these changes by doing `npx quartz sync`. This should deploy your site to `.github.io/`. - -> [!hint] -> If you get an error about not being allowed to deploy to `github-pages` due to environment protection rules, make sure you remove any existing GitHub pages environments. -> -> You can do this by going to your Settings page on your GitHub fork and going to the Environments tab and pressing the trash icon. The GitHub action will recreate the environment for you correctly the next time you sync your Quartz. - -> [!info] -> Quartz generates files in the format of `file.html` instead of `file/index.html` which means the trailing slashes for _non-folder paths_ are dropped. As GitHub pages does not do this redirect, this may cause existing links to your site that use trailing slashes to break. If not breaking existing links is important to you (e.g. you are migrating from Quartz 3), consider using [[#Cloudflare Pages]]. - -### Custom Domain - -Here's how to add a custom domain to your GitHub pages deployment. - -1. Head to the "Settings" tab of your forked repository. -2. In the "Code and automation" section of the sidebar, click "Pages". -3. Under "Custom Domain", type your custom domain and click "Save". -4. This next step depends on whether you are using an apex domain (`example.com`) or a subdomain (`subdomain.example.com`). - - If you are using an apex domain, navigate to your DNS provider and create an `A` record that points your apex domain to GitHub's name servers which have the following IP addresses: - - `185.199.108.153` - - `185.199.109.153` - - `185.199.110.153` - - `185.199.111.153` - - If you are using a subdomain, navigate to your DNS provider and create a `CNAME` record that points your subdomain to the default domain for your site. For example, if you want to use the subdomain `quartz.example.com` for your user site, create a `CNAME` record that points `quartz.example.com` to `.github.io`. - -![[dns records.png]]_The above shows a screenshot of Google Domains configured for both `jzhao.xyz` (an apex domain) and `quartz.jzhao.xyz` (a subdomain)._ - -See the [GitHub documentation](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain) for more detail about how to setup your own custom domain with GitHub Pages. - -> [!question] Why aren't my changes showing up? -> There could be many different reasons why your changes aren't showing up but the most likely reason is that you forgot to push your changes to GitHub. -> -> Make sure you save your changes to Git and sync it to GitHub by doing `npx quartz sync`. This will also make sure to pull any updates you may have made from other devices so you have them locally. - -## Vercel - -### Fix URLs - -Before deploying to Vercel, a `vercel.json` file is required at the root of the project directory. It needs to contain the following configuration so that URLs don't require the `.html` extension: - -```json title="vercel.json" -{ - "cleanUrls": true -} -``` - -### Deploy to Vercel - -1. Log in to the [Vercel Dashboard](https://vercel.com/dashboard) and click "Add New..." > Project -2. Import the Git repository containing your Quartz project. -3. Give the project a name (lowercase characters and hyphens only) -4. Check that these configuration options are set: - -| Configuration option | Value | -| ----------------------------------------- | ------------------ | -| Framework Preset | `Other` | -| Root Directory | `./` | -| Build and Output Settings > Build Command | `npx quartz build` | - -5. Press Deploy. Once it's live, you'll have 2 `*.vercel.app` URLs to view the page. - -### Custom Domain - -> [!note] -> If there is something already hosted on the domain, these steps will not work without replacing the previous content. As a workaround, you could use Next.js rewrites or use the next section to create a subdomain. - -1. Update the `baseUrl` in `quartz.config.js` if necessary. -2. Go to the [Domains - Dashboard](https://vercel.com/dashboard/domains) page in Vercel. -3. Connect the domain to Vercel -4. Press "Add" to connect a custom domain to Vercel. -5. Select your Quartz repository and press Continue. -6. Enter the domain you want to connect it to. -7. Follow the instructions to update your DNS records until you see "Valid Configuration" - -### Use a Subdomain - -Using `docs.example.com` is an example of a subdomain. They're a simple way of connecting multiple deployments to one domain. - -1. Update the `baseUrl` in `quartz.config.js` if necessary. -2. Ensure your domain has been added to the [Domains - Dashboard](https://vercel.com/dashboard/domains) page in Vercel. -3. Go to the [Vercel Dashboard](https://vercel.com/dashboard) and select your Quartz project. -4. Go to the Settings tab and then click Domains in the sidebar -5. Enter your subdomain into the field and press Add - -## Netlify - -1. Log in to the [Netlify dashboard](https://app.netlify.com/) and click "Add new site". -2. Select your Git provider and repository containing your Quartz project. -3. Under "Build command", enter `npx quartz build`. -4. Under "Publish directory", enter `public`. -5. Press Deploy. Once it's live, you'll have a `*.netlify.app` URL to view the page. -6. To add a custom domain, check "Domain management" in the left sidebar, just like with Vercel. - -## GitLab Pages - -In your local Quartz, create a new file `.gitlab-ci.yaml`. - -```yaml title=".gitlab-ci.yaml" -stages: - - build - - deploy - -variables: - NODE_VERSION: "18.14" - -build: - stage: build - rules: - - if: '$CI_COMMIT_REF_NAME == "v4"' - before_script: - - apt-get update -q && apt-get install -y nodejs npm - - npm install -g n - - n $NODE_VERSION - - hash -r - - npm ci - script: - - npx quartz build - artifacts: - paths: - - public - cache: - paths: - - ~/.npm/ - key: "${CI_COMMIT_REF_SLUG}-node-${CI_COMMIT_REF_NAME}" - tags: - - docker - -pages: - stage: deploy - rules: - - if: '$CI_COMMIT_REF_NAME == "v4"' - script: - - echo "Deploying to GitLab Pages..." - artifacts: - paths: - - public -``` - -When `.gitlab-ci.yaml` is committed, GitLab will build and deploy the website as a GitLab Page. You can find the url under `Deploy > Pages` in the sidebar. - -By default, the page is private and only visible when logged in to a GitLab account with access to the repository but can be opened in the settings under `Deploy` -> `Pages`. - -## Self-Hosting - -Copy the `public` directory to your web server and configure it to serve the files. You can use any web server to host your site. Since Quartz generates links that do not include the `.html` extension, you need to let your web server know how to deal with it. - -### Using Nginx - -Here's an example of how to do this with Nginx: - -```nginx title="nginx.conf" -server { - listen 80; - server_name example.com; - root /path/to/quartz/public; - index index.html; - error_page 404 /404.html; - - location / { - try_files $uri $uri.html $uri/ =404; - } -} -``` diff --git a/docs/images/dns records.png b/docs/images/dns records.png deleted file mode 100644 index bdcb2417..00000000 Binary files a/docs/images/dns records.png and /dev/null differ diff --git a/docs/images/github-init-repo-options.png b/docs/images/github-init-repo-options.png deleted file mode 100644 index 2444b4ac..00000000 Binary files a/docs/images/github-init-repo-options.png and /dev/null differ diff --git a/docs/images/github-quick-setup.png b/docs/images/github-quick-setup.png deleted file mode 100644 index a0e6dc0f..00000000 Binary files a/docs/images/github-quick-setup.png and /dev/null differ diff --git a/docs/images/quartz layout.png b/docs/images/quartz layout.png deleted file mode 100644 index 03435f7d..00000000 Binary files a/docs/images/quartz layout.png and /dev/null differ diff --git a/docs/images/quartz transform pipeline.png b/docs/images/quartz transform pipeline.png deleted file mode 100644 index 159a5632..00000000 Binary files a/docs/images/quartz transform pipeline.png and /dev/null differ diff --git a/docs/layout.md b/docs/layout.md deleted file mode 100644 index 3fabeb79..00000000 --- a/docs/layout.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Layout ---- - -Certain emitters may also output [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML) files. To enable easy customization, these emitters allow you to fully rearrange the layout of the page. The default page layouts can be found in `quartz.layout.ts`. - -Each page is composed of multiple different sections which contain `QuartzComponents`. The following code snippet lists all of the valid sections that you can add components to: - -```typescript title="quartz/cfg.ts" -export interface FullPageLayout { - head: QuartzComponent // single component - header: QuartzComponent[] // laid out horizontally - beforeBody: QuartzComponent[] // laid out vertically - pageBody: QuartzComponent // single component - left: QuartzComponent[] // vertical on desktop, horizontal on mobile - right: QuartzComponent[] // vertical on desktop, horizontal on mobile - footer: QuartzComponent // single component -} -``` - -These correspond to following parts of the page: - -![[quartz layout.png|800]] - -> [!note] -> There are two additional layout fields that are _not_ shown in the above diagram. -> -> 1. `head` is a single component that renders the `` [tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head) in the HTML. This doesn't appear visually on the page and is only is responsible for metadata about the document like the tab title, scripts, and styles. -> 2. `header` is a set of components that are laid out horizontally and appears _before_ the `beforeBody` section. This enables you to replicate the old Quartz 3 header bar where the title, search bar, and dark mode toggle. By default, Quartz 4 doesn't place any components in the `header`. - -Quartz **components**, like plugins, can take in additional properties as configuration options. If you're familiar with React terminology, you can think of them as Higher-order Components. - -See [a list of all the components](component.md) for all available components along with their configuration options. You can also checkout the guide on [[creating components]] if you're interested in further customizing the behaviour of Quartz. - -### Style - -Most meaningful style changes like colour scheme and font can be done simply through the [[configuration#General Configuration|general configuration]] options. However, if you'd like to make more involved style changes, you can do this by writing your own styles. Quartz 4, like Quartz 3, uses [Sass](https://sass-lang.com/guide/) for styling. - -You can see the base style sheet in `quartz/styles/base.scss` and write your own in `quartz/styles/custom.scss`. - -> [!note] -> Some components may provide their own styling as well! For example, `quartz/components/Darkmode.tsx` imports styles from `quartz/components/styles/darkmode.scss`. If you'd like to customize styling for a specific component, double check the component definition to see how its styles are defined. diff --git a/docs/migrating from Quartz 3.md b/docs/migrating from Quartz 3.md deleted file mode 100644 index 2fdc7315..00000000 --- a/docs/migrating from Quartz 3.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "Migrating from Quartz 3" ---- - -As you already have Quartz locally, you don't need to fork or clone it again. Simply just checkout the alpha branch, install the dependencies, and import your old vault. - -```bash -git fetch -git checkout v4 -git pull upstream v4 -npm i -npx quartz create -``` - -If you get an error like `fatal: 'upstream' does not appear to be a git repository`, make sure you add `upstream` as a remote origin: - -```shell -git remote add upstream https://github.com/jackyzha0/quartz.git -``` - -When running `npx quartz create`, you will be prompted as to how to initialize your content folder. Here, you can choose to import or link your previous content folder and Quartz should work just as you expect it to. - -> [!note] -> If the existing content folder you'd like to use is at the _same_ path on a different branch, clone the repo again somewhere at a _different_ path in order to use it. - -## Key changes - -1. **Removing Hugo and `hugo-obsidian`**: Hugo worked well for earlier versions of Quartz but it also made it hard for people outside of the Golang and Hugo communities to fully understand what Quartz was doing under the hood and be able to properly customize it to their needs. Quartz 4 now uses a Node-based static-site generation process which should lead to a much more helpful error messages and an overall smoother user experience. -2. **Full-hot reload**: The many rough edges of how `hugo-obsidian` integrated with Hugo meant that watch mode didn't re-trigger `hugo-obsidian` to update the content index. This lead to a lot of weird cases where the watch mode output wasn't accurate. Quartz 4 now uses a cohesive parse, filter, and emit pipeline which gets run on every change so hot-reloads are always accurate. -3. **Replacing Go template syntax with JSX**: Quartz 3 used [Go templates](https://pkg.go.dev/text/template) to create layouts for pages. However, the syntax isn't great for doing any sort of complex rendering (like [text processing](https://github.com/jackyzha0/quartz/blob/hugo/layouts/partials/textprocessing.html)) and it got very difficult to make any meaningful layout changes to Quartz 3. Quartz 4 uses an extension of JavaScript syntax called JSX which allows you to write layout code that looks like HTML in JavaScript which is significantly easier to understand and maintain. -4. **A new extensible [[configuration]] and [[configuration#Plugins|plugin]] system**: Quartz 3 was hard to configure without technical knowledge of how Hugo's partials worked. Extensions were even hard to make. Quartz 4's configuration and plugin system is designed to be extended by users while making updating to new versions of Quartz easy. - -## Things to update - -- You will need to update your deploy scripts. See the [[hosting]] guide for more details. -- Ensure that your default branch on GitHub is updated from `hugo` to `v4`. -- [[folder and tag listings|Folder and tag listings]] have also changed. - - Folder descriptions should go under `content//index.md` where `` is the name of the folder. - - Tag descriptions should go under `content/tags/.md` where `` is the name of the tag. -- Some HTML layout may not be the same between Quartz 3 and Quartz 4. If you depended on a particular HTML hierarchy or class names, you may need to update your custom CSS to reflect these changes. -- If you customized the layout of Quartz 3, you may need to translate these changes from Go templates back to JSX as Quartz 4 no longer uses Hugo. For components, check out the guide on [[creating components]] for more details on this. diff --git a/docs/philosophy.md b/docs/philosophy.md deleted file mode 100644 index af5510aa..00000000 --- a/docs/philosophy.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Philosophy of Quartz ---- - -## A garden should be a true hypertext - -> The garden is the web as topology. Every walk through the garden creates new paths, new meanings, and when we add things to the garden we add them in a way that allows many future, unpredicted relationships. -> -> _(The Garden and the Stream)_ - -The problem with the file cabinet is that it focuses on efficiency of access and interoperability rather than generativity and creativity. Thinking is not linear, nor is it hierarchical. In fact, not many things are linear or hierarchical at all. Then why is it that most tools and thinking strategies assume a nice chronological or hierarchical order for my thought processes? - -The ideal tool for thought for me would embrace the messiness of my mind, and organically help insights emerge from chaos instead of forcing an artificial order. A rhizomatic, not arboresecent, form of note taking. - -My goal with a digital garden is not purely as an organizing system and information store (though it works nicely for that). I want my digital garden to be a playground for new ways ideas can connect together. As a result, existing formal organizing systems like Zettelkasten or the hierarchical folder structures of Notion don’t work well for me. There is way too much upfront friction that by the time I’ve thought about how to organize my thought into folders categories, I’ve lost it. - -Quartz embraces the inherent rhizomatic and web-like nature of our thinking and tries to encourage note-taking in a similar form. - ---- - -## A garden should be shared - -The goal of digital gardening should be to tap into your network’s collective intelligence to create constructive feedback loops. If done well, I have a shareable representation of my thoughts that I can send out into the world and people can respond. Even for my most half-baked thoughts, this helps me create a feedback cycle to strengthen and fully flesh out that idea. - -Quartz is designed first and foremost as a tool for publishing [digital gardens](https://jzhao.xyz/posts/networked-thought) to the web. To me, digital gardening is not just passive knowledge collection. It’s a form of expression and sharing. - -> “[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 - -**The goal of Quartz is to make sharing your digital garden free and simple.** - ---- - -## A garden should be your own - -At its core, Quartz is designed to be easy to use enough for non-technical people to get going but also powerful enough that senior developers can tweak it to work how they'd like it to work. - -1. If you like the default configuration of Quartz and just want to change the content, the only thing that you need to change is the contents of the `content` folder. -2. If you'd like to make basic configuration tweaks but don't want to edit source code, one can tweak the plugins and components in `quartz.config.ts` and `quartz.layout.ts` in a guided manner to their liking. -3. If you'd like to tweak the actual source code of the underlying plugins, components, or even build process, Quartz purposefully ships its full source code to the end user to allow customization at this level too. - -Most software either confines you to either - -1. Makes it easy to tweak content but not the presentation -2. Gives you too many knobs to tune the presentation without good opinionated defaults - -**Quartz should feel powerful but ultimately be an intuitive tool fully within your control.** It should be a piece of [agentic software](https://jzhao.xyz/posts/agentic-computing). Ultimately, it should have the right affordances to nudge users towards good defaults but never dictate what the 'correct' way of using it is. diff --git a/docs/plugins/AliasRedirects.md b/docs/plugins/AliasRedirects.md deleted file mode 100644 index 3a33ce64..00000000 --- a/docs/plugins/AliasRedirects.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: AliasRedirects -tags: - - plugin/emitter ---- - -This plugin emits HTML redirect pages for aliases and permalinks defined in the frontmatter of content files. - -For example, A `foo.md` has the following frontmatter - -```md title="foo.md" ---- -title: "Foo" -alias: - - "bar" ---- -``` - -The target `host.me/bar` will be redirected to `host.me/foo` - -Note that these are permanent redirect. - -The emitter supports the following aliases: - -- `aliases` -- `alias` - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Emitter -- Function name: `Plugin.AliasRedirects()`. -- Source: [`quartz/plugins/emitters/aliases.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/aliases.ts). diff --git a/docs/plugins/Assets.md b/docs/plugins/Assets.md deleted file mode 100644 index eb03994e..00000000 --- a/docs/plugins/Assets.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Assets -tags: - - plugin/emitter ---- - -This plugin emits all non-Markdown static assets in your content folder (like images, videos, HTML, etc). The plugin respects the `ignorePatterns` in the global [[configuration]]. - -Note that all static assets will then be accessible through its path on your generated site, i.e: `host.me/path/to/static.pdf` - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Emitter -- Function name: `Plugin.Assets()`. -- Source: [`quartz/plugins/emitters/assets.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/assets.ts). diff --git a/docs/plugins/CNAME.md b/docs/plugins/CNAME.md deleted file mode 100644 index 1cc0b5cc..00000000 --- a/docs/plugins/CNAME.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: CNAME -tags: - - plugin/emitter ---- - -This plugin emits a `CNAME` record that points your subdomain to the default domain of your site. - -If you want to use a custom domain name like `quartz.example.com` for the site, then this is needed. - -See [[Hosting]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Emitter -- Function name: `Plugin.CNAME()`. -- Source: [`quartz/plugins/emitters/cname.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/cname.ts). diff --git a/docs/plugins/ComponentResources.md b/docs/plugins/ComponentResources.md deleted file mode 100644 index 739c1707..00000000 --- a/docs/plugins/ComponentResources.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: ComponentResources -tags: - - plugin/emitter ---- - -This plugin manages and emits the static resources required for the Quartz framework. This includes CSS stylesheets and JavaScript scripts that enhance the functionality and aesthetics of the generated site. See also the `cdnCaching` option in the `theme` section of the [[configuration]]. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Emitter -- Function name: `Plugin.ComponentResources()`. -- Source: [`quartz/plugins/emitters/componentResources.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/componentResources.ts). diff --git a/docs/plugins/ContentIndex.md b/docs/plugins/ContentIndex.md deleted file mode 100644 index af235b05..00000000 --- a/docs/plugins/ContentIndex.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: ContentIndex -tags: - - plugin/emitter ---- - -This plugin emits both RSS and an XML sitemap for your site. The [[RSS Feed]] allows users to subscribe to content on your site and the sitemap allows search engines to better index your site. The plugin also emits a `contentIndex.json` file which is used by dynamic frontend components like search and graph. - -This plugin emits a comprehensive index of the site's content, generating additional resources such as a sitemap, an RSS feed, and a - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `enableSiteMap`: If `true` (default), generates a sitemap XML file (`sitemap.xml`) listing all site URLs for search engines in content discovery. -- `enableRSS`: If `true` (default), produces an RSS feed (`index.xml`) with recent content updates. -- `rssLimit`: Defines the maximum number of entries to include in the RSS feed, helping to focus on the most recent or relevant content. Defaults to `10`. -- `rssFullHtml`: If `true`, the RSS feed includes full HTML content. Otherwise it includes just summaries. -- `includeEmptyFiles`: If `true` (default), content files with no body text are included in the generated index and resources. - -## API - -- Category: Emitter -- Function name: `Plugin.ContentIndex()`. -- Source: [`quartz/plugins/emitters/contentIndex.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/contentIndex.ts). diff --git a/docs/plugins/ContentPage.md b/docs/plugins/ContentPage.md deleted file mode 100644 index 5d9016f3..00000000 --- a/docs/plugins/ContentPage.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: ContentPage -tags: - - plugin/emitter ---- - -This plugin is a core component of the Quartz framework. It generates the HTML pages for each piece of Markdown content. It emits the full-page [[layout]], including headers, footers, and body content, among others. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Emitter -- Function name: `Plugin.ContentPage()`. -- Source: [`quartz/plugins/emitters/contentPage.tsx`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/contentPage.tsx). diff --git a/docs/plugins/CrawlLinks.md b/docs/plugins/CrawlLinks.md deleted file mode 100644 index 15a0d660..00000000 --- a/docs/plugins/CrawlLinks.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: CrawlLinks -tags: - - plugin/transformer ---- - -This plugin parses links and processes them to point to the right places. It is also needed for embedded links (like images). See [[Obsidian compatibility]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `markdownLinkResolution`: Sets the strategy for resolving Markdown paths, can be `"absolute"` (default), `"relative"` or `"shortest"`. You should use the same setting here as in [[Obsidian compatibility|Obsidian]]. - - `absolute`: Path relative to the root of the content folder. - - `relative`: Path relative to the file you are linking from. - - `shortest`: Name of the file. If this isn't enough to identify the file, use the full absolute path. -- `prettyLinks`: If `true` (default), simplifies links by removing folder paths, making them more user friendly (e.g. `folder/deeply/nested/note` becomes `note`). -- `openLinksInNewTab`: If `true`, configures external links to open in a new tab. Defaults to `false`. -- `lazyLoad`: If `true`, adds lazy loading to resource elements (`img`, `video`, etc.) to improve page load performance. Defaults to `false`. -- `externalLinkIcon`: Adds an icon next to external links when `true` (default) to visually distinguishing them from internal links. - -> [!warning] -> Removing this plugin is _not_ recommended and will likely break the page. - -## API - -- Category: Transformer -- Function name: `Plugin.CrawlLinks()`. -- Source: [`quartz/plugins/transformers/links.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/links.ts). diff --git a/docs/plugins/CreatedModifiedDate.md b/docs/plugins/CreatedModifiedDate.md deleted file mode 100644 index 6a0f1371..00000000 --- a/docs/plugins/CreatedModifiedDate.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "CreatedModifiedDate" -tags: - - plugin/transformer ---- - -This plugin determines the created, modified, and published dates for a document using three potential data sources: frontmatter metadata, Git history, and the filesystem. See [[authoring content#Syntax]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `priority`: The data sources to consult for date information. Highest priority first. Possible values are `"frontmatter"`, `"git"`, and `"filesystem"`. Defaults to `"frontmatter", "git", "filesystem"]`. - -> [!warning] -> If you rely on `git` for dates, make sure `defaultDateType` is set to `modified` in `quartz.config.ts`. -> -> Depending on how you [[hosting|host]] your Quartz, the `filesystem` dates of your local files may not match the final dates. In these cases, it may be better to use `git` or `frontmatter` to guarantee correct dates. - -## API - -- Category: Transformer -- Function name: `Plugin.CreatedModifiedDate()`. -- Source: [`quartz/plugins/transformers/lastmod.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/lastmod.ts). diff --git a/docs/plugins/Description.md b/docs/plugins/Description.md deleted file mode 100644 index 526bb017..00000000 --- a/docs/plugins/Description.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Description -tags: - - plugin/transformer ---- - -This plugin generates descriptions that are used as metadata for the HTML `head`, the [[RSS Feed]] and in [[folder and tag listings]] if there is no main body content, the description is used as the text between the title and the listing. - -If the frontmatter contains a `description` property, it is used (see [[authoring content#Syntax]]). Otherwise, the plugin will do its best to use the first few sentences of the content to reach the target description length. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `descriptionLength`: the maximum length of the generated description. Default is 150 characters. The cut off happens after the first _sentence_ that ends after the given length. -- `replaceExternalLinks`: If `true` (default), replace external links with their domain and path in the description (e.g. `https://domain.tld/some_page/another_page?query=hello&target=world` is replaced with `domain.tld/some_page/another_page`). - -## API - -- Category: Transformer -- Function name: `Plugin.Description()`. -- Source: [`quartz/plugins/transformers/description.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/description.ts). diff --git a/docs/plugins/ExplicitPublish.md b/docs/plugins/ExplicitPublish.md deleted file mode 100644 index 7c7aceb6..00000000 --- a/docs/plugins/ExplicitPublish.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: ExplicitPublish -tags: - - plugin/filter ---- - -This plugin filters content based on an explicit `publish` flag in the frontmatter, allowing only content that is explicitly marked for publication to pass through. It's the opt-in version of [[RemoveDrafts]]. See [[private pages]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Filter -- Function name: `Plugin.ExplicitPublish()`. -- Source: [`quartz/plugins/filters/explicit.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/filters/explicit.ts). diff --git a/docs/plugins/FolderPage.md b/docs/plugins/FolderPage.md deleted file mode 100644 index 92a700ae..00000000 --- a/docs/plugins/FolderPage.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: FolderPage -tags: - - plugin/emitter ---- - -This plugin generates index pages for folders, creating a listing page for each folder that contains multiple content files. See [[folder and tag listings]] for more information. - -Example: [[advanced/|Advanced]] - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -The pages are displayed using the `defaultListPageLayout` in `quartz.layouts.ts`. For the content, the `FolderContent` component is used. If you want to modify the layout, you must edit it directly (`quartz/components/pages/FolderContent.tsx`). - -## API - -- Category: Emitter -- Function name: `Plugin.FolderPage()`. -- Source: [`quartz/plugins/emitters/folderPage.tsx`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/folderPage.tsx). diff --git a/docs/plugins/Frontmatter.md b/docs/plugins/Frontmatter.md deleted file mode 100644 index 960417a8..00000000 --- a/docs/plugins/Frontmatter.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Frontmatter" -tags: - - plugin/transformer ---- - -This plugin parses the frontmatter of the page using the [gray-matter](https://github.com/jonschlinkert/gray-matter) library. See [[authoring content#Syntax]], [[Obsidian compatibility]] and [[OxHugo compatibility]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `delimiters`: the delimiters to use for the frontmatter. Can have one value (e.g. `"---"`) or separate values for opening and closing delimiters (e.g. `["---", "~~~"]`). Defaults to `"---"`. -- `language`: the language to use for parsing the frontmatter. Can be `yaml` (default) or `toml`. - -> [!warning] -> This plugin must not be removed, otherwise Quartz will break. - -## API - -- Category: Transformer -- Function name: `Plugin.Frontmatter()`. -- Source: [`quartz/plugins/transformers/frontmatter.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/frontmatter.ts). diff --git a/docs/plugins/GitHubFlavoredMarkdown.md b/docs/plugins/GitHubFlavoredMarkdown.md deleted file mode 100644 index 2ea8f8d3..00000000 --- a/docs/plugins/GitHubFlavoredMarkdown.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: GitHubFlavoredMarkdown -tags: - - plugin/transformer ---- - -This plugin enhances Markdown processing to support GitHub Flavored Markdown (GFM) which adds features like autolink literals, footnotes, strikethrough, tables and tasklists. - -In addition, this plugin adds optional features for typographic refinement (such as converting straight quotes to curly quotes, dashes to en-dashes/em-dashes, and ellipses) and automatic heading links as a symbol that appears next to the heading on hover. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `enableSmartyPants`: When true, enables typographic enhancements. Default is true. -- `linkHeadings`: When true, automatically adds links to headings. Default is true. - -## API - -- Category: Transformer -- Function name: `Plugin.GitHubFlavoredMarkdown()`. -- Source: [`quartz/plugins/transformers/gfm.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/gfm.ts). diff --git a/docs/plugins/HardLineBreaks.md b/docs/plugins/HardLineBreaks.md deleted file mode 100644 index d35d74cf..00000000 --- a/docs/plugins/HardLineBreaks.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: HardLineBreaks -tags: - - plugin/transformer ---- - -This plugin automatically converts single line breaks in Markdown text into hard line breaks in the HTML output. This plugin is not enabled by default as this doesn't follow the semantics of actual Markdown but you may enable it if you'd like parity with [[Obsidian compatibility|Obsidian]]. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Transformer -- Function name: `Plugin.HardLineBreaks()`. -- Source: [`quartz/plugins/transformers/linebreaks.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/linebreaks.ts). diff --git a/docs/plugins/Latex.md b/docs/plugins/Latex.md deleted file mode 100644 index 8a8999e8..00000000 --- a/docs/plugins/Latex.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "Latex" -tags: - - plugin/transformer ---- - -This plugin adds LaTeX support to Quartz. See [[features/Latex|Latex]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `renderEngine`: the engine to use to render LaTeX equations. Can be `"katex"` for [KaTeX](https://katex.org/) or `"mathjax"` for [MathJax](https://www.mathjax.org/) [SVG rendering](https://docs.mathjax.org/en/latest/output/svg.html). Defaults to KaTeX. - -## API - -- Category: Transformer -- Function name: `Plugin.Latex()`. -- Source: [`quartz/plugins/transformers/latex.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/latex.ts). diff --git a/docs/plugins/NotFoundPage.md b/docs/plugins/NotFoundPage.md deleted file mode 100644 index 082f8642..00000000 --- a/docs/plugins/NotFoundPage.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: NotFoundPage -tags: - - plugin/emitter ---- - -This plugin emits a 404 (Not Found) page for broken or non-existent URLs. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Emitter -- Function name: `Plugin.NotFoundPage()`. -- Source: [`quartz/plugins/emitters/404.tsx`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/404.tsx). diff --git a/docs/plugins/ObsidianFlavoredMarkdown.md b/docs/plugins/ObsidianFlavoredMarkdown.md deleted file mode 100644 index c4240865..00000000 --- a/docs/plugins/ObsidianFlavoredMarkdown.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: ObsidianFlavoredMarkdown -tags: - - plugin/transformer ---- - -This plugin provides support for [[Obsidian compatibility]]. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `comments`: If `true` (default), enables parsing of `%%` style Obsidian comment blocks. -- `highlight`: If `true` (default), enables parsing of `==` style highlights within content. -- `wikilinks`:If `true` (default), turns [[wikilinks]] into regular links. -- `callouts`: If `true` (default), adds support for [[callouts|callout]] blocks for emphasizing content. -- `mermaid`: If `true` (default), enables [[Mermaid diagrams|Mermaid diagram]] rendering within Markdown files. -- `parseTags`: If `true` (default), parses and links tags within the content. -- `parseArrows`: If `true` (default), transforms arrow symbols into their HTML character equivalents. -- `parseBlockReferences`: If `true` (default), handles block references, linking to specific content blocks. -- `enableInHtmlEmbed`: If `true`, allows embedding of content directly within HTML. Defaults to `false`. -- `enableYouTubeEmbed`: If `true` (default), enables the embedding of YouTube videos and playlists using external image Markdown syntax. -- `enableVideoEmbed`: If `true` (default), enables the embedding of video files. -- `enableCheckbox`: If `true`, adds support for interactive checkboxes in content. Defaults to `false`. - -> [!warning] -> Don't remove this plugin if you're using [[Obsidian compatibility|Obsidian]] to author the content! - -## API - -- Category: Transformer -- Function name: `Plugin.ObsidianFlavoredMarkdown()`. -- Source: [`quartz/plugins/transformers/toc.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/toc.ts). diff --git a/docs/plugins/OxHugoFlavoredMarkdown.md b/docs/plugins/OxHugoFlavoredMarkdown.md deleted file mode 100644 index 523a2158..00000000 --- a/docs/plugins/OxHugoFlavoredMarkdown.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: OxHugoFlavoredMarkdown -tags: - - plugin/transformer ---- - -This plugin provides support for [ox-hugo](https://github.com/kaushalmodi/ox-hugo) compatibility. See [[OxHugo compatibility]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `wikilinks`: If `true` (default), converts Hugo `{{ relref }}` shortcodes to Quartz [[wikilinks]]. -- `removePredefinedAnchor`: If `true` (default), strips predefined anchors from headings. -- `removeHugoShortcode`: If `true` (default), removes Hugo shortcode syntax (`{{}}`) from the content. -- `replaceFigureWithMdImg`: If `true` (default), replaces `
` with `![]()`. -- `replaceOrgLatex`: If `true` (default), converts Org-mode [[features/Latex|Latex]] fragments to Quartz-compatible LaTeX wrapped in `$` (for inline) and `$$` (for block equations). - -> [!warning] -> While you can use this together with [[ObsidianFlavoredMarkdown]], it's not recommended because it might mutate the file in unexpected ways. Use with caution. -> -> If you use `toml` frontmatter, make sure to configure the [[Frontmatter]] plugin accordingly. See [[OxHugo compatibility]] for an example. - -## API - -- Category: Transformer -- Function name: `Plugin.OxHugoFlavoredMarkdown()`. -- Source: [`quartz/plugins/transformers/oxhugofm.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/oxhugofm.ts). diff --git a/docs/plugins/RemoveDrafts.md b/docs/plugins/RemoveDrafts.md deleted file mode 100644 index 729ac86a..00000000 --- a/docs/plugins/RemoveDrafts.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: RemoveDrafts -tags: - - plugin/filter ---- - -This plugin filters out content from your vault, so that only finalized content is made available. This prevents [[private pages]] from being published. By default, it filters out all pages with `draft: true` in the frontmatter and leaves all other pages intact. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Filter -- Function name: `Plugin.RemoveDrafts()`. -- Source: [`quartz/plugins/filters/draft.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/filters/draft.ts). diff --git a/docs/plugins/Static.md b/docs/plugins/Static.md deleted file mode 100644 index c660eabf..00000000 --- a/docs/plugins/Static.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Static -tags: - - plugin/emitter ---- - -This plugin emits all static resources needed by Quartz. This is used, for example, for fonts and images that need a stable position, such as banners and icons. The plugin respects the `ignorePatterns` in the global [[configuration]]. - -> [!important] -> This is different from [[Assets]]. The resources from the [[Static]] plugin are located under `quartz/static`, whereas [[Assets]] renders all static resources under `content` and is used for images, videos, audio, etc. that are directly referenced by your markdown content. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -## API - -- Category: Emitter -- Function name: `Plugin.Static()`. -- Source: [`quartz/plugins/emitters/static.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/static.ts). diff --git a/docs/plugins/SyntaxHighlighting.md b/docs/plugins/SyntaxHighlighting.md deleted file mode 100644 index 8bf581eb..00000000 --- a/docs/plugins/SyntaxHighlighting.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "SyntaxHighlighting" -tags: - - plugin/transformer ---- - -This plugin is used to add syntax highlighting to code blocks in Quartz. See [[syntax highlighting]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `theme`: a separate id of one of the [themes bundled with Shikiji](https://shikiji.netlify.app/themes). One for light mode and one for dark mode. Defaults to `theme: { light: "github-light", dark: "github-dark" }`. -- `keepBackground`: If set to `true`, the background of the Shikiji theme will be used. With `false` (default) the Quartz theme color for background will be used instead. - -In addition, you can further override the colours in the `quartz/styles/syntax.scss` file. - -## API - -- Category: Transformer -- Function name: `Plugin.SyntaxHighlighting()`. -- Source: [`quartz/plugins/transformers/syntax.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/syntax.ts). diff --git a/docs/plugins/TableOfContents.md b/docs/plugins/TableOfContents.md deleted file mode 100644 index d443d0ea..00000000 --- a/docs/plugins/TableOfContents.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: TableOfContents -tags: - - plugin/transformer ---- - -This plugin generates a table of contents (TOC) for Markdown documents. See [[table of contents]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin accepts the following configuration options: - -- `maxDepth`: Limits the depth of headings included in the TOC, ranging from `1` (top level headings only) to `6` (all heading levels). Default is `3`. -- `minEntries`: The minimum number of heading entries required for the TOC to be displayed. Default is `1`. -- `showByDefault`: If `true` (default), the TOC should be displayed by default. Can be overridden by frontmatter settings. -- `collapseByDefault`: If `true`, the TOC will start in a collapsed state. Default is `false`. - -> [!warning] -> This plugin needs the `Component.TableOfContents` component in `quartz.layout.ts` to determine where to display the TOC. Without it, nothing will be displayed. They should always be added or removed together. - -## API - -- Category: Transformer -- Function name: `Plugin.TableOfContents()`. -- Source: [`quartz/plugins/transformers/toc.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/toc.ts). diff --git a/docs/plugins/TagPage.md b/docs/plugins/TagPage.md deleted file mode 100644 index cd7dee60..00000000 --- a/docs/plugins/TagPage.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: TagPage -tags: - - plugin/emitter ---- - -This plugin emits dedicated pages for each tag used in the content. See [[folder and tag listings]] for more information. - -> [!note] -> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page. - -This plugin has no configuration options. - -The pages are displayed using the `defaultListPageLayout` in `quartz.layouts.ts`. For the content, the `TagContent` component is used. If you want to modify the layout, you must edit it directly (`quartz/components/pages/TagContent.tsx`). - -## API - -- Category: Emitter -- Function name: `Plugin.TagPage()`. -- Source: [`quartz/plugins/emitters/tagPage.tsx`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/tagPage.tsx). diff --git a/docs/setting up your GitHub repository.md b/docs/setting up your GitHub repository.md deleted file mode 100644 index 43a556dc..00000000 --- a/docs/setting up your GitHub repository.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Setting up your GitHub repository ---- - -First, make sure you have Quartz [[index#🪴 Get Started|cloned and setup locally]]. - -Then, create a new repository on GitHub.com. Do **not** initialize the new repository with `README`, license, or `gitignore` files. - -![[github-init-repo-options.png]] - -At the top of your repository on GitHub.com's Quick Setup page, click the clipboard to copy the remote repository URL. - -![[github-quick-setup.png]] - -In your terminal of choice, navigate to the root of your Quartz folder. Then, run the following commands, replacing `REMOTE-URL` with the URL you just copied from the previous step. - -```bash -# list all the repositories that are tracked -git remote -v - -# if the origin doesn't match your own repository, set your repository as the origin -git remote set-url origin REMOTE-URL - -# if you don't have upstream as a remote, add it so updates work -git remote add upstream https://github.com/jackyzha0/quartz.git -``` - -Then, you can sync the content to upload it to your repository. This is a helper command that will do the initial push of your content to your repository. - -```bash -npx quartz sync --no-pull -``` - -> [!warning]- `fatal: --[no-]autostash option is only valid with --rebase` -> You may have an outdated version of `git`. Updating `git` should fix this issue. - -In future updates, you can simply run `npx quartz sync` every time you want to push updates to your repository. - -> [!hint] Flags and options -> For full help options, you can run `npx quartz sync --help`. -> -> Most of these have sensible defaults but you can override them if you have a custom setup: -> -> - `-d` or `--directory`: the content folder. This is normally just `content` -> - `-v` or `--verbose`: print out extra logging information -> - `--commit` or `--no-commit`: whether to make a `git` commit for your changes -> - `--push` or `--no-push`: whether to push updates to your GitHub fork of Quartz -> - `--pull` or `--no-pull`: whether to try and pull in any updates from your GitHub fork (i.e. from other devices) before pushing diff --git a/docs/showcase.md b/docs/showcase.md deleted file mode 100644 index 0509e93a..00000000 --- a/docs/showcase.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "Quartz 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/) -- [Socratica Toolbox](https://toolbox.socratica.info/) -- [oldwinter の数字花园](https://garden.oldwinter.top/) -- [Aaron Pham's Garden](https://aarnphm.xyz/) -- [The Quantum Garden](https://quantumgardener.blog/) -- [Abhijeet's Math Wiki](https://abhmul.github.io/quartz/Math-Wiki/) -- [Matt Dunn's Second Brain](https://mattdunn.info/) -- [Pelayo Arbues' Notes](https://pelayoarbues.github.io/) -- [Vince Imbat's Talahardin](https://vinceimbat.com/) -- [🧠🌳 Chad's Mind Garden](https://www.chadly.net/) -- [Pedro MC Fernandes's Topo da Mente](https://www.pmcf.xyz/topo-da-mente/) -- [Mau Camargo's Notkesto](https://notes.camargomau.com/) -- [Caicai's Novels](https://imoko.cc/blog/caicai/) -- [🌊 Collapsed Wave](https://collapsedwave.com/) -- [Sideny's 3D Artist's Handbook](https://sidney-eliot.github.io/3d-artists-handbook/) -- [Mike's AI Garden 🤖🪴](https://mwalton.me/) -- [Brandon Boswell's Garden](https://brandonkboswell.com) -- [Scaling Synthesis - A hypertext research notebook](https://scalingsynthesis.com/) -- [Data Dictionary 🧠](https://glossary.airbyte.com/) -- [sspaeti.com's Second Brain](https://brain.sspaeti.com/) -- [🪴Aster's notebook](https://notes.asterhu.com) - -If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4/docs/showcase.md)! diff --git a/docs/tags/component.md b/docs/tags/component.md deleted file mode 100644 index 57592e8c..00000000 --- a/docs/tags/component.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Components ---- - -Want to create your own custom component? Check out the advanced guide on [[creating components]] for more information. diff --git a/docs/tags/plugin.md b/docs/tags/plugin.md deleted file mode 100644 index 298ff164..00000000 --- a/docs/tags/plugin.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Plugins ---- diff --git a/docs/upgrading.md b/docs/upgrading.md deleted file mode 100644 index a3a82754..00000000 --- a/docs/upgrading.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Upgrading Quartz" ---- - -> [!note] -> This is specifically a guide for upgrading Quartz 4 version to a more recent update. If you are coming from Quartz 3, check out the [[migrating from Quartz 3|migration guide]] for more info. - -To fetch the latest Quartz updates, simply run - -```bash -npx quartz update -``` - -As Quartz uses [git](https://git-scm.com/) under the hood for versioning, updating effectively 'pulls' in the updates from the official Quartz GitHub repository. If you have local changes that might conflict with the updates, you may need to resolve these manually yourself (or, pull manually using `git pull origin upstream`). - -> [!hint] -> Quartz will try to cache your content before updating to try and prevent merge conflicts. If you get a conflict mid-merge, you can stop the merge and then run `npx quartz restore` to restore your content from the cache. - -If you have the [GitHub desktop app](https://desktop.github.com/), this will automatically open to help you resolve the conflicts. Otherwise, you will need to resolve this in a text editor like VSCode. For more help on resolving conflicts manually, check out the [GitHub guide on resolving merge conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line#competing-line-change-merge-conflicts).