Commit Graph

45 Commits

Author SHA1 Message Date
Jacky Zhao
7cb1c291c8 fix: allow formatting in callout titles 2024-01-31 11:41:27 -08:00
LUCASTUCIOUS
072ee64127
feat: Feature/custom callout icon (#727)
* Add icons as masks

To handle a simple way to add custom icons, i made it pure css. Icon are now a mask for the callout-icon div, so they always follow the --color form the current callout.

Now to add a custom icon, you simply add

```css
.callout {
  &[data-callout="custom"] {
    --color: #customcolor;
    --border: #custombordercolor;
    --bg: #custombg;
    --callout-icon: url('data:image/svg+xml; utf8, <custom formatted svg>');

  }
```

to custom.scss

* remove now unused code

* Make callouts an enum

* docs: update instructions for custom callouts

* Prettier & run format

* dynamic matching

For maintainability, make dynamic mathching. If we or Obsidian want to support more callouts, we simply add it to the enum

* callout mapping const

Getting ride of the enum entierly as it's not worth here?

* fix callout icon styling

* Add forgotten icons

* Rebase

* harmonize callout icon and fold icon

* fix docs + prettier

* Update docs/features/callouts.md

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Update quartz/plugins/transformers/ofm.ts

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Suggestions fix

* remove unecessary rules

* comment is always nice

* Update docs/features/callouts.md

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2024-01-30 22:10:13 -08:00
kabirgh
0a76707062
feat: Emit custom event when theme changes (#723)
* Emit custom event when theme changes

* Type themechange custom event

* Update darkmode docs
2024-01-23 14:52:41 -08:00
Aaron Pham
4d338cec13
feat(ofm): add options to parse arrows (#713)
* feat(ofm): add options to parse arrows

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>

* feat(ofm): add options to parse arrows

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>

---------

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
2024-01-21 11:33:32 -08:00
ikorihn
0a8c38dc21
fix: small typos (#686) 2024-01-13 09:09:41 -08:00
jeff
88194ac348
feat: allow embedding youtube videos with the obsidian markdown syntax (#665)
* Add option to allow embedding YouTube videos with Obsidian Markdown syntax

* Update Obsidian compatability doc page

* Switch to converting YT links as an html plugin
2024-01-02 10:49:14 -08:00
Sidney
e1b6a0014c
docs: add explorer example for advanced sortFn (#564)
* Added doc example to explorer sortFn

* Prettier fixed formatting

* Let Prettier fix the formatting of the entire markdown file

* Updated example

* Added extra commentary and fixed example

* Update docs/features/explorer.md

* doc fixes

* docs: remove leftover TODO

* docs: move example to `advanced`

---------

Co-authored-by: Sidney <85735034+Epicrex@users.noreply.github.com>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
Co-authored-by: Ben Schlegel <ben5.schlegel@gmail.com>
2023-12-28 12:04:15 +01:00
Jacky Zhao
ad1f964a5f docs: graph view tag options 2023-12-17 13:19:03 -08:00
Jacky Zhao
3c01b92cc4 docs: note embeds and update git hint 2023-12-16 11:04:18 -08:00
Rune Antonsen
9a599aebea
feat(breadcrumbs): add option to hide current page (#601)
* feat(breadcrumbs): add option to hide current page

* Remove debug lines

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

---------

Co-authored-by: ruant <ruant@ruant.net>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2023-11-20 08:28:16 -08:00
Jacky Zhao
43d638a6de perf: compute mapping of folder name to file data for faster breadcrumbs 2023-11-11 21:06:37 -08:00
Jacky Zhao
134b6ed582 fix: anchors links shouldnt cause reload (closes #574) 2023-11-11 10:11:31 -08:00
Niklas Schröder
2a6b9a9ea0
docs: fix property name for ToC toggle (#573) 2023-11-07 09:16:48 -08:00
Jacky Zhao
101e9946bd feat: add collapseByDefault option to TableOfContents (closes #566) 2023-11-04 12:11:42 -07:00
Blue Rose
06ccb89cd7
docs: clarifications about globs (#559)
* Add note about fast-glob

* Add warning about non-markdown files

Also added a glob pattern to filter out all non-markdown files outside of a specified folder.

* run npm format

---------

Co-authored-by: wych <wychwitchcraft@gmail.com>
2023-10-31 13:53:49 -07:00
Thomas
86d16b12a2
docs(explorer): Fixed small typo with extra } in explorer.md (#541) 2023-10-17 19:43:20 -07:00
Jacky Zhao
da0a062c05 feat: docker support for v4 (closes #530) 2023-10-08 09:59:18 -07:00
Hrishikesh Barman
2f99339dcf
feat: add transformations for latex in oxhugofm (#510)
ox-hugo currently supports the following syntax for latex equations:
- https://orgmode.org/manual/LaTeX-fragments.html
- https://ox-hugo.scripter.co/doc/equations

This syntax is supported by mathjax as is mentioned in the ox-hugo documentation.

But quartz uses remark-math which has some issues with the \( \) syntax.
See https://github.com/remarkjs/remark-math/issues/39

This change adds few more transformations to the OxHugoFlavouredMarkdown
plugin, which makes a best effort conversion of this syntax into what
the Quartz Latex transformer plugin supports.

With these changes, the generated files show latex formatting with
default quartz configuration.

Sidenote on `\_` escape by ox-hugo:

ox-hugo escapes, _ using \_, we match against it after we transform
equations into what quartz supports($$ and $).

This could be achieved using lookaround like regex as follows
```js
(?<=(\$|\$\$)[\s\S]*) -> Positive lookbehind for $ or $$
\\_ -> Matches \_
(?=[\s\S]*(?:\1)) Positive lookahead for $ or $$ if matched
const escapedUnderscoreRegex = new RegExp(/(?<=(\$|\$\$)[\s\S]*)\\_(?=[\s\S]*(?:\1))/, "g")
````

But since lookahead/behind can slow things down on large files, we just
look up all equations with $ and $$ delimiters and then try replacing \_
2023-09-29 11:35:26 -07:00
Catchears
0138085c16
docs: fix typo in breadcrumbs documentation (#513) 2023-09-29 08:19:10 -07:00
Ben Schlegel
0b61f6fbfd
feat: implement breadcrumb component (#508)
* feat: implement breadcrumbs

* style: fix styling, move breadcrumbs to top

* refactor: move `capitalize to `lang.ts``

* refactor: clean breadcrumb generation

* feat: add options to breadcrumbs

* feat: implement `resolveFrontmatterTitle`

* feat: add `hideOnRoot` option

* feat(consistency): capitalize every crumb

* style: add `flex-wrap` to parent container

* refactor: clean `Breadcrumbs.tsx`

* feat(accessibility): use `nav`, add aria label

* style: improve look in popovers by adding margin

* docs: write docs for breadcrumb component

* refactor: collapse `if` condition for hideOnRoot

* chore: add todo for perf optimization

* docs: update introduction
2023-09-29 10:26:15 +02:00
Ben Schlegel
d4c122646c
fix(explorer): default sortFn implementation (#511)
* fix: use `numeric` + `base` for localeCompare

* docs(explorer): update default sortFn
2023-09-28 08:39:44 -07:00
Ben Schlegel
fa69c2a565
fix(explorer): increase consistency, explicitly use font-family (#496)
* fix(explorer): display name for folders without `index` file

* docs(explorer): add section for folder display names

* docs(explorer): fix broken wikilink

* fix(consistency): explicitly set font + label/link fix

Use consistent styling between folders with `folderClickBehavior: "link"` and `"collapse`

* Update quartz/components/styles/explorer.scss

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Update quartz/components/styles/explorer.scss

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2023-09-21 19:35:11 +02:00
Ben Schlegel
8eb1554b13
fix(explorer): display names for folders without frontmatter (#494)
* fix(explorer): display name for folders without `index` file

* docs(explorer): add section for folder display names
2023-09-21 18:54:33 +02:00
Ben Schlegel
dcdeae4e7b
docs(explorer): update default config + new example (#493) 2023-09-21 18:53:19 +02:00
Jacky Zhao
16d33fb771
feat: display name for folders, expand explorer a little bit (#489)
* feat: display name for folders, expand explorer a little bit

* update docs
2023-09-20 16:08:54 -07:00
Jacky Zhao
6a9e6352e8 Revert "feat: Making Quartz available offline by making it a PWA (#465)"
This reverts commit d6301fae90.
2023-09-20 13:52:45 -07:00
Jacky Zhao
70e029d151 Revert "docs: wording changes for offline support"
This reverts commit 52a172d1a4.
2023-09-20 13:52:29 -07:00
Jacky Zhao
0bad3ce799 docs: document enableToc 2023-09-20 11:58:52 -07:00
Jacky Zhao
52a172d1a4 docs: wording changes for offline support 2023-09-20 11:40:36 -07:00
Adam Brangenberg
d6301fae90
feat: Making Quartz available offline by making it a PWA (#465)
* Adding PWA and chaching for offline aviability

* renamed workbox config to fit Quartz' scheme

* Documenting new configuration

* Added missig umami documentation

* Fixed formatting so the build passes, thank you prettier :)

* specified caching strategies to improve performance

* formatting...

* fixing "404 manifest.json not found" on subdirectories by adding a / to manifestpath

* turning it into a plugin

* Removed Workbox-cli and updated @types/node

* Added Serviceworkercode to offline.ts

* formatting

* Removing workbox from docs

* applied suggestions

* Removed path.join for sw path

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Removed path.join for manifest path

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Removing path module import

* Added absolute path to manifests start_url and manifest "import" using baseUrl

* Adding protocol to baseurl

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Adding protocol to start_url too then

* formatting...

* Adding fallback page

* Documenting offline plugin

* formatting...

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* merge suggestion

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* formatting...

* Fixing manifest path, all these nits hiding the actual issues .-.

* Offline fallback page through plugins, most things taken from 404 Plugin

* adding Offline Plugin to config

* formatting...

* Turned offline off as default and removed offline.md

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2023-09-20 11:38:13 -07:00
Ben Schlegel
0d3cf29226
docs: fix explorer example (#483) 2023-09-18 14:32:00 -07:00
Ben Schlegel
4afb099bf3
docs: fix examples 2023-09-17 21:32:23 +02:00
Ben Schlegel
6914d4b40c
docs: fix intra page links 2023-09-17 21:20:09 +02:00
Ben Schlegel
5cc9253c41
docs(explorer): write docs for new features 2023-09-17 16:41:23 +02:00
Ben Schlegel
91f9ae2d71
feat: implement file explorer component (closes #201) (#452)
* feat: add basic explorer structure„

* feat: integrate new component/plugin

* feat: add basic explorer structure

* feat: add sort to FileNodes

* style: improve style for explorer

* refactor: remove unused explorer plugin

* refactor: clean explorer structure, fix base (toc)

* refactor: clean css, respect displayClass

* style: add styling to chevron

* refactor: clean up debug statements

* refactor: remove unused import

* fix: clicking folder icon sometimes turns invisible

* refactor: clean css

* feat(explorer): add config for title

* feat: add config for folder click behavior

* fix: `no-pointer` not being set for all elements

new approach, have one `no-pointer` class, that removes pointer events and one `clickable` class on the svg and button (everything that can normally be clicked). then, find all children with `clickable` and toggle `no-pointer`

* fix: bug where nested folders got incorrect height

this fixes the bug where nested folders weren't calculating their total height correctly. done by adding class to main container of all children and calculating total

* feat: introduce `folderDefaultState` config

* feat: store depth for explorer nodes

* feat: implement option for collapsed state + bug fixes

folderBehavior: "link" still has bad styling, but major bugs with pointers fixed (not clean yet, but working)

* fix: default folder icon rotation

* fix: hitbox problem with folder links, fix style

* fix: redirect url for nested folders

* fix: inconsistent behavior with 'collapseFolders' opt

* chore: add comments to `ExplorerNode`

* feat: save explorer state to local storage (not clean)

* feat: rework `getFolders()`, fix localstorage read + write

* feat: set folder state from localStorage

needs serious refactoring but functional (except folder icon orientation)

* fix: folder icon orientation after local storage

* feat: add config for `useSavedState`

* refactor: clean `explorer.inline.ts`

remove unused functions, comments, unused code, add types to EventHandler

* refactor: clean explorer

merge `isSvg` paths, remove console logs

* refactor: add documentation, remove unused funcs

* feat: rework folder collapse logic

use grids instead of jank scuffed solution with calculating total heights

* refactor: remove depth arg from insert

* feat: restore collapse functionality to clicks

allow folder icon + folder label to collapse folders again

* refactor: remove `pointer-event` jank

* feat: improve svg viewbox + remove unused props

* feat: use css selector to toggle icon

rework folder icon to work purely with css instead of JS manipulation

* refactor: remove unused cfg

* feat: move TOC to right sidebar

* refactor: clean css

* style: fix overflow + overflow margin

* fix: use `resolveRelative` to resolve file paths

* fix: `defaultFolderState` config option

* refactor: rename import, rename `folderLi` + ul

* fix: use `QuartzPluginData` type

* docs: add explorer documentation
2023-09-15 09:39:16 -07:00
Jacky Zhao
cce389c81d
feat: note transclusion (#475)
* basic transclude

* feat: note transclusion
2023-09-13 11:28:53 -07:00
Jacky Zhao
e3b879741b feat: rich html rss (closes #460) 2023-09-12 21:44:03 -07:00
Stefano Cecere
06df00b186
typo (it's draft, not drafts) (#456) 2023-09-07 08:13:41 -07:00
Jacky Zhao
989bee5979 docs: correct field for ignorePatterns 2023-09-06 21:08:08 -07:00
Jacky Zhao
8d6029b7b8 feat: 404 page emitter 2023-09-06 21:02:21 -07:00
Ben Schlegel
6ef4246cf1
docs: update full-text-search.md (#447) 2023-09-03 22:36:30 -07:00
Dr Kim Foale
616a7f148a
docs: Make it clearer that wikilinks go to paths not page titles (#448) 2023-09-03 21:29:58 -07:00
Jacky Zhao
e3265f8416 docs: simplify oxhugo page 2023-08-26 10:42:55 -07:00
Hrishikesh Barman
bc543f81d9
feat(plugins): add OxHugoFlavouredMarkdown (#419)
* feat(plugins): add OxHugoFlavouredMarkdown

ox-hugo is an org exporter backend that exports org files to
hugo-compatible markdown in an opinionated way. This plugin adds some
tweaks to the generated markdown to make it compatible with quartz but
the list of changes applied it is not extensive.

In the future however, we could leapfrog ox-hugo altogether and
create a quartz site directly out of org-roam files. That way we won't
have to do all the ritual dancing that this plugin has to perform.
See https://github.com/k2052/org-to-markdown

* fix: add toml to remarkFrontmatter configuration

* docs: add docs for OxHugoFlavouredMarkdown

* fixup! docs: add docs for OxHugoFlavouredMarkdown
2023-08-25 22:52:23 -07:00
kanpov
0aaf88b852
Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00