Commit Graph

870 Commits

Author SHA1 Message Date
saberzero1
90fbee4ef8
fix: use dangerouslySetInnerHTML for inline CSS to prevent HTML-escaping
Preact was escaping & characters in SCSS-compiled CSS (e.g. & nesting)
into &, breaking CSS rules. Using dangerouslySetInnerHTML bypasses
the escaping, matching how browsers expect style element content.
2026-02-14 01:11:56 +01:00
saberzero1
bff9b464a9
refactor: consolidate utils to re-export from @quartz-community/utils 2026-02-14 00:46:40 +01:00
saberzero1
66f86faf3c
refactor: remove inline scripts/styles migrated to plugins
Delete dead code: callout, checkbox, mermaid inline scripts and styles
are now bundled by the obsidian-flavored-markdown plugin. Clipboard
script and styles moved to the syntax-highlighting plugin. listPage.scss
was unreferenced. Body.tsx simplified to a pure layout wrapper.
2026-02-14 00:34:54 +01:00
saberzero1
6b0364e2e4
Migrate emitters to external plugins (alias-redirects, cname, favicon, content-index, og-image) 2026-02-14 00:06:26 +01:00
saberzero1
70ef4f9fd5
Migrate filters to external plugins (remove-draft, explicit-publish)
Delete internal RemoveDrafts and ExplicitPublish filter implementations,
install them as community plugins, and update quartz.config.ts to use
ExternalPlugin.RemoveDrafts().
2026-02-13 23:30:14 +01:00
saberzero1
074951afea
feat: extract transformers to community plugins and fix type compatibility
- Delete 12 internal transformer files (keep FrontMatter as internal)
- Switch quartz.config.ts to use ExternalPlugin.* for all transformers
- Align branded types with @quartz-community/types (_brand, FullSlug etc.)
- Add vfile DataMap augmentations for fields from extracted transformers
- Update all 29 plugins to @quartz-community/types v0.2.1
2026-02-13 23:07:27 +01:00
saberzero1
93bd7c5caf
fix: populate ctx.trie in PageTypeDispatcher before rendering
Components like FolderContent depend on ctx.trie for folder hierarchy.
The dispatcher now lazily initializes it via trieFromAllFiles in emit
and force-rebuilds it in partialEmit to reflect file changes.
2026-02-13 20:10:06 +01:00
saberzero1
5c6dc75934
refactor: remove migrated page body components
Delete Content, FolderContent, TagContent page components now provided
by community PageType plugins. Update components barrel export.
2026-02-13 19:35:22 +01:00
saberzero1
ce19b13808
refactor: delete old page-rendering emitters
Remove ContentPage, FolderPage, TagPage, and NotFoundPage emitters
now replaced by community PageType plugins and the PageTypeDispatcher.
2026-02-13 19:35:15 +01:00
saberzero1
17b5c61834
refactor: update dispatcher to cast PageTypePluginEntry at boundary
Add getPageTypes() helper that casts config's PageTypePluginEntry[]
to QuartzPageTypePluginInstance[] in one place. Cast VirtualPage.slug
to FullSlug at emitPage/defaultProcessedContent call sites.
2026-02-13 19:35:03 +01:00
saberzero1
fd36066fdf
feat: add PageTypePluginEntry for cross-boundary type compatibility
Introduce PageTypePluginEntry with never[] parameter types to accept
both internal and community PageType plugins in config arrays without
casts, working around branded FullSlug contravariance mismatch.
2026-02-13 19:34:56 +01:00
saberzero1
68f3c3fadd
feat: add PageType plugin infrastructure (Phase D Step 4) 2026-02-13 19:12:19 +01:00
saberzero1
f8a682ab45
refactor: unify QuartzComponent type to structural interface (Phase C)
- Changed QuartzComponent from ComponentType<QuartzComponentProps> to callable type ((props: QuartzComponentProps) => any)
- Added optional displayName property for better debugging
- Removed ComponentType import from preact
- Removed all 13 'as QuartzComponent' type casts from quartz.layout.ts
- Community plugin components now directly assignable without casts
2026-02-13 18:26:19 +01:00
saberzero1
e6d3695657
refactor: delete 6 internal component duplicates (Phase A)
Remove Backlinks, Breadcrumbs, RecentNotes, Search, TableOfContents,
Comments, and OverflowList — all replaced by community plugins.
Delete associated styles (6) and scripts (3). Switch layout to use
Plugin.Breadcrumbs() instead of Component.Breadcrumbs().
2026-02-13 18:13:52 +01:00
saberzero1
264bb7cfca
feat: migrate 7 feature components to community plugins (Phase B)
Migrate ArticleTitle, TagList, PageTitle, Darkmode, ReaderMode,
ContentMeta, and Footer from internal components to community
plugins. Update layout to use Plugin.X() pattern, remove internal
component files and their styles/scripts.

Add MIGRATION_TASKS.md documenting the full migration roadmap.
2026-02-13 17:17:51 +01:00
saberzero1
dbb3aac1c0
feat: build installed plugins 2026-02-10 00:03:43 +01:00
saberzero1
c48b1ad08e
chore: updated plugins 2026-02-09 23:46:47 +01:00
saberzero1
9c4a1f8af7
Fix TypeScript errors in git-installed plugins
- Install @quartz-community/types as devDependency

- Fix plugin imports to define types locally

- Fix search inline script fetchData bug

- Format code with prettier
2026-02-08 12:36:13 +01:00
saberzero1
574b7fa3a5
Add comprehensive Git-based plugin CLI with lockfile support
- Create quartz.lock.json format for tracking exact plugin commits

- Add 'npx quartz plugin' commands: install, add, remove, update, list, restore

- Plugin state is fully reproducible via lockfile

- No npm dependencies required for community plugins
2026-02-08 12:06:39 +01:00
saberzero1
5a6a2515ca
Implement Git-based plugin system with dogfooding for community plugins
- Remove npm dependencies for @quartz-community/* plugins

- Add gitLoader.ts for installing plugins from GitHub

- Update quartz.layout.ts to import from .quartz/plugins/

- Add install-plugins.ts script for prebuild hook

- Add .quartz/ to .gitignore
2026-02-08 12:01:03 +01:00
saberzero1
d11622f024
feat(plugins): graph as community plugin 2026-02-07 05:56:24 +01:00
saberzero1
e4ea2c96d4
feat(plugins): explorer as community plugin 2026-02-07 03:10:50 +01:00
saberzero1
4066ffdace
feat(plugins): v5 plugin system 2026-02-07 02:01:38 +01:00
Emile Bangma
b4fb0e6682
fix(explorer): mobile scroll containment (#2283)
* fix(explorer): mobile scroll contaiment

* only apply scroll containment to explorer on mobile
2026-01-20 12:37:40 -05:00
Emile Bangma
f346a01296
feat(explorer): Add active class to current folder in explorer (#2196)
Some checks failed
Build and Test / build-and-test (ubuntu-latest) (push) Has been skipped
Build and Test / publish-tag (push) Has been skipped
Docker build & push image / build (push) Has been skipped
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
2026-01-08 09:54:41 +08:00
Rahmat Ardiansyah
c2dcc63b5f
feat: add scroll padding for mobile screen (#2249) 2026-01-08 09:36:02 +08:00
derfalx
c2bea8a4c4
fix(citation): Language parameter for non en-US settings (#2075)
* Fix language parameter of the citation plugin for non en-US settings

Per default the rehype-citation project only supports en-US, as
explained here: https://github.com/timlrx/rehype-citation/issues/12
For other languages one can provide a locale-file either by passing
its path or providing an URL. The following repository contains locale
files for multiple languages. So, these are used, in case a non en-US
language is used in quarzt. But this optimistically assumes there is
indeed an according locale file.

In summary this solves the problem only partially, since there are
still some languages which will not work properly.

* Fixing code style by running prettier with --write

* Excluding `en-US` locales from the new behaviour.

* Removing unnecessary `null` und `undefined` check.

* Update quartz/plugins/transformers/citations.ts

* Update quartz/plugins/transformers/citations.ts

* Update quartz/plugins/transformers/citations.ts

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2026-01-08 09:30:42 +08:00
Jon Erling Hustadnes
5208a96a37
fix(build.ts/startWatching): add option awaitWriteFinish with 250ms threshold (#2235)
Some checks failed
Build and Test / build-and-test (ubuntu-latest) (push) Has been skipped
Build and Test / publish-tag (push) Has been skipped
Docker build & push image / build (push) Has been skipped
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
This makes it so that the events are not fired until the file have stabilized.
This also changes the order of the fired events.
A move / rename now results in `delete` then `add` rather than the other way around.

From `chokidar` README - https://github.com/paulmillr/chokidar?tab=readme-ov-file#performance:
```
awaitWriteFinish.stabilityThreshold (default: 2000). Amount of time in milliseconds for a file size to remain constant before emitting its event.
```

Fixes #2232
2026-01-05 19:34:45 +08:00
Jacky Zhao
7dc826be0a fix(css): darkmode + readermode safari height
Some checks failed
Build and Test / build-and-test (ubuntu-latest) (push) Has been skipped
Build and Test / publish-tag (push) Has been skipped
Docker build & push image / build (push) Has been skipped
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
2026-01-03 23:39:56 +08:00
AshGrey : りす 🐿️
9c042dd717
fix(helpers): correct regex of function escapePath (#2254)
Some checks failed
Build and Test / publish-tag (push) Has been cancelled
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
2025-12-19 11:37:53 -08:00
Rahmat Ardiansyah
bacd19c4ea
feat: implement touch dragging event (#2224)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
2025-12-09 13:50:04 -05:00
Rithsagea
e6cc9ba368
fix: pass mathjax macros to rehype correctly (#2218)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
2025-12-06 22:51:37 -05:00
Eritque arcus
643aca5ffa
fix(LaTex/render/Typst): Add stroke color to typst-doc styles (#2237)
Some checks are pending
Build and Test / build-and-test (macos-latest) (push) Waiting to run
Build and Test / build-and-test (ubuntu-latest) (push) Waiting to run
Build and Test / build-and-test (windows-latest) (push) Waiting to run
Build and Test / publish-tag (push) Waiting to run
Docker build & push image / build (push) Waiting to run
* fix: Add stroke color to typst-doc styles

* chore: better style by override

* fix: remove * selector in CSS

* chore: remove empty line
2025-12-06 17:01:04 -05:00
うろちょろ
ec26ebcc9e
feat: improve search tokenization for CJK languages (#2231)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
* feat: improve search tokenization for CJK languages

Enhance the encoder function to properly tokenize CJK (Chinese, Japanese,
Korean) characters while maintaining English word tokenization. This fixes
search issues where CJK text was not searchable due to whitespace-only
splitting.

Changes:
- Tokenize CJK characters (Hiragana, Katakana, Kanji, Hangul) individually
- Preserve whitespace-based tokenization for non-CJK text
- Support mixed CJK/English content in search queries

This addresses the CJK search issues reported in #2109 where Japanese text
like "て以来" was not searchable because the encoder only split on whitespace.

Tested with Japanese, Chinese, and Korean content to verify character-level
tokenization works correctly while maintaining English search functionality.

* perf: optimize CJK search encoder with manual buffer tracking

Replace regex-based tokenization with index-based buffer management.
This improves performance by ~2.93x according to benchmark results.

- Use explicit buffer start/end indices instead of string concatenation
- Replace split(/\s+/) with direct whitespace code point checks
- Remove redundant filter() operations
- Add CJK Extension A support (U+20000-U+2A6DF)

Performance: ~878ms → ~300ms (100 iterations, mixed CJK/English text)

* test: add comprehensive unit tests for CJK search encoder

Add 21 unit tests covering:
- English word tokenization
- CJK character-level tokenization (Japanese, Korean, Chinese)
- Mixed CJK/English content
- Edge cases

All tests pass, confirming the encoder correctly handles CJK text.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-02 10:04:38 -08:00
Nhat
13ff64db97
feat(i18n): update Vietnamese translations (#2228)
Some checks are pending
Build and Test / build-and-test (macos-latest) (push) Waiting to run
Build and Test / build-and-test (ubuntu-latest) (push) Waiting to run
Build and Test / build-and-test (windows-latest) (push) Waiting to run
Build and Test / publish-tag (push) Waiting to run
Docker build & push image / build (push) Waiting to run
* feat(i18n): update Vietnamese translations

* Apply suggestion from @aarnphm

Co-authored-by: Aaron Pham <contact@aarnphm.xyz>

---------

Co-authored-by: Aaron Pham <contact@aarnphm.xyz>
2025-11-29 13:31:17 -05:00
Adam Laycock
87f7f4804e
Prevent double-loading of afterDOMReady scripts (#2213)
Co-authored-by: Adam <adam@canny.io>
2025-11-27 14:51:56 -08:00
Lunyaa
ef29c69828
add rybbit analytics (#2197)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
2025-11-07 16:48:28 +01:00
Emile Bangma
86a30ad150
fix(callouts): set height to entire callout content (#2194)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
* fix(callouts): set height to entire callout content

* Refactor callout-content to collapse all children simultaneously

* Testing better transition
2025-11-06 09:05:32 -05:00
Marco Ciotola
0ecb859d2d
feat(i18n): update Italian translations for coherency (#2189)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
Update Italian translation for better plurals and idioms consistency
2025-11-02 05:35:23 -05:00
Michael Thomason
2fdc8129b6
fix(components): prevent infinite recursion from circular transcludes (#2187)
Some checks are pending
Build and Test / build-and-test (macos-latest) (push) Waiting to run
Build and Test / build-and-test (ubuntu-latest) (push) Waiting to run
Build and Test / build-and-test (windows-latest) (push) Waiting to run
Build and Test / publish-tag (push) Waiting to run
Docker build & push image / build (push) Waiting to run
* fix(components): prevent infinite recursion from circular transcludes

* chore(components): modify warning message

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

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2025-11-01 06:22:29 -04:00
松浦 知也 Matsuura Tomoya
8bc6cb9061
fix(css): not break word in the search button placeholder (#2182)
Some checks are pending
Build and Test / build-and-test (macos-latest) (push) Waiting to run
Build and Test / build-and-test (ubuntu-latest) (push) Waiting to run
Build and Test / build-and-test (windows-latest) (push) Waiting to run
Build and Test / publish-tag (push) Waiting to run
Docker build & push image / build (push) Waiting to run
* fixed not to break in the button

* fixed style
2025-10-31 17:01:51 -07:00
Jiangnan Li
af5773f0e4
fix(api): adapt to updated API parameter format from (#2185)
is-absolute-url v5.0.0
2025-10-31 16:59:46 -07:00
yavidor
4260214a07
feat(i18n): add Hebrew translations for UI components and pages (#2186)
* Added hebrew

* Better translations

* Added NewLine at EOF
2025-10-31 16:58:37 -07:00
Alexei Chernyavsky
0c4386dce1
feat(i18n): add Kazakh translations for UI components and pages (#2056)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
2025-10-30 01:27:51 -04:00
Jairus Joer
08c861707b
fix(explorer): Disable keyboard navigation on collapsed folders (#2169)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
2025-10-28 09:37:32 -07:00
FishCat233
52460f376f
fix: modified time data of frontmatter didnt loaded. (#2165)
Some checks failed
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
2025-10-16 09:10:25 -07:00
martyone
f14260b2ba
fix(oxhugo): Do not discard embedded HTML (#2151)
Some checks failed
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
In 'processors/parse.ts' the 'remarkRehype' plugin is used with
'allowDangerousHtml' enabled, but that needs to be combined with (e.g.)
'rehypeRaw' to have any effect on the output.
2025-10-02 10:51:40 -07:00
Emile Bangma
4923affa77
fix(callouts)!: match callout DOM to Obsidian (#2104)
Some checks are pending
Build and Test / build-and-test (macos-latest) (push) Waiting to run
Build and Test / build-and-test (ubuntu-latest) (push) Waiting to run
Build and Test / build-and-test (windows-latest) (push) Waiting to run
Build and Test / publish-tag (push) Waiting to run
Docker build & push image / build (push) Waiting to run
* fix(callouts): match callout DOM to Obsidian

* use new transition curve for all callout transitions

* chore!: bump version to 4.5.2
2025-09-21 19:14:03 +02:00
Jacky Zhao
4c78d29c13 fix(search): css min padding
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
2025-09-18 13:45:17 -07:00
Amir Pourmand
7a77f54e50
fix(i18n): Add RTL Detection based on Config Set Language (#2100)
Some checks are pending
Build and Test / build-and-test (macos-latest) (push) Waiting to run
Build and Test / build-and-test (ubuntu-latest) (push) Waiting to run
Build and Test / build-and-test (windows-latest) (push) Waiting to run
Build and Test / publish-tag (push) Waiting to run
Docker build & push image / build (push) Waiting to run
* Add rtl automatic detection to base.scss

* Implement RTL support for Arabic and Persian locales and update HTML direction attribute in renderPage component

* Update HTML direction attribute in renderPage component to prioritize frontmatter dir value

* Refactor renderPage component to simplify HTML direction attribute assignment by removing frontmatter dir fallback
2025-09-17 16:04:22 -07:00