1
0
mirror of https://gitlab.com/MisterBiggs/brain-quartz.git synced 2026-06-04 05:20:35 +00:00
Commit Graph

859 Commits

Author SHA1 Message Date
Anson 37f78a3fe9 feat: convert broken wiki links to plain text instead of styled anchors
When disableBrokenWikilinks is enabled, wiki links to non-existent
pages now render as plain text rather than faded anchor tags.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 00:54:25 -05:00
Anson e48fc95aaf Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4 2026-01-15 00:46:07 -05:00
Emile Bangma f346a01296 feat(explorer): Add active class to current folder in explorer (#2196) 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)
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 2026-01-03 23:39:56 +08:00
AshGrey : りす 🐿️ 9c042dd717 fix(helpers): correct regex of function escapePath (#2254) 2025-12-19 11:37:53 -08:00
Rahmat Ardiansyah bacd19c4ea feat: implement touch dragging event (#2224) 2025-12-09 13:50:04 -05:00
Rithsagea e6cc9ba368 fix: pass mathjax macros to rehype correctly (#2218) 2025-12-06 22:51:37 -05:00
Eritque arcus 643aca5ffa fix(LaTex/render/Typst): Add stroke color to typst-doc styles (#2237)
* 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)
* 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)
* 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
Anson ee80f65736 feat: hide category pills when category is already wiki-linked in content
Reduce visual clutter by only showing category pills for categories that
aren't already mentioned as wiki links in the note's content.

Implementation:
- Store outgoing links separately in links.ts before adding categories
- Added outgoingLinks to vfile DataMap type
- Modified CategoryList to filter out categories already in outgoingLinks
- Only category pills for unlinked categories are now displayed

Example:
If a note has categories: [[LLM]], [[Anthropic]], [[AI]] and the content
mentions [[LLM]] and [[Anthropic]], only the AI category pill will appear.

This follows Wikipedia's principle of avoiding redundant links and reduces
visual clutter while maintaining backlinks and graph connections.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 11:02:27 -05:00
Anson a1a9b5233d feat: implement wiki-linked categories with graph and backlinks integration
Add complete category system that integrates with Obsidian's wiki-linked
category frontmatter. Categories appear as pills on pages and link directly
to category notes (not aggregation pages).

Features:
- Parse [[Page Name]] syntax from category frontmatter
- Display category pills styled like tags
- Link directly to category notes
- Integrate with graph view connections
- Enable bidirectional backlinks
- Preserve case in category slugs

Implementation:
- Added extractWikiLinks() to frontmatter transformer
- Created CategoryList component for pill rendering
- Modified links transformer to include categories in links array
- Updated contentIndex to export category metadata
- Added i18n strings for category UI elements
- Set includeEmptyFiles: true to show empty category pages in graph

Files modified:
- quartz/plugins/transformers/frontmatter.ts
- quartz/plugins/transformers/links.ts
- quartz/plugins/emitters/contentIndex.tsx
- quartz/components/CategoryList.tsx (new)
- quartz/components/pages/CategoryContent.tsx (new)
- quartz/plugins/emitters/categoryPage.tsx (new)
- quartz/i18n/locales/en-US.ts
- quartz/i18n/locales/definition.ts
- quartz/components/index.ts
- quartz.layout.ts
- quartz.config.ts
- README.md (updated with Quartz updater documentation)

Security: Comprehensive privacy review confirms NO information leaks from
private folder. All ignore patterns working correctly.

Docs: Added CUSTOMIZATIONS.md with complete feature documentation,
implementation details, and privacy audit results.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 15:59:17 -05:00
Anson 342d6428a3 Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4 2025-11-09 15:15:58 -05:00
Lunyaa ef29c69828 add rybbit analytics (#2197) 2025-11-07 16:48:28 +01:00
Emile Bangma 86a30ad150 fix(callouts): set height to entire callout content (#2194)
* 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)
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)
* 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)
* 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) 2025-10-30 01:27:51 -04:00
Jairus Joer 08c861707b fix(explorer): Disable keyboard navigation on collapsed folders (#2169) 2025-10-28 09:37:32 -07:00
FishCat233 52460f376f fix: modified time data of frontmatter didnt loaded. (#2165) 2025-10-16 09:10:25 -07:00
martyone f14260b2ba fix(oxhugo): Do not discard embedded HTML (#2151)
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)
* 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 2025-09-18 13:45:17 -07:00
Amir Pourmand 7a77f54e50 fix(i18n): Add RTL Detection based on Config Set Language (#2100)
* 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
Amir Pourmand 03ccac2872 feat: Update FlexSearch and Add Support for All Languages (#2108)
* chore(deps): update flexsearch to version 0.8.205 and adjust search encoder.

* refactor(search): enhance search encoder and update search results type

- Improved the encoder function to filter out empty tokens.
- Updated the search results type from a specific FlexSearch type to a more generic 'any' type for flexibility.
- Removed redundant rtl property from the index configuration.

* refactor(search): remove rtl property from search index configuration

* refactor(search): improve encoder function formatting

- Updated the encoder function to use consistent arrow function syntax for better readability.

* refactor(search): update search results type to DefaultDocumentSearchResults

- Imported DefaultDocumentSearchResults from FlexSearch for improved type safety.
- Changed the type of searchResults from 'any' to DefaultDocumentSearchResults<Item> for better clarity and maintainability.
2025-09-17 15:39:30 -07:00
Jacky Zhao 6add0c837e fix(style): layout flow, search restyle 2025-09-17 15:26:49 -07:00
Eritque arcus 8df8d5c6ef fix: fix CNAME path error (#2096)
* fix: fix CNAME path error

* chore: Update quartz/plugins/emitters/cname.ts

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

* chore: remove unused import

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2025-09-17 14:50:12 -07:00
Anson 6783a351a9 Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4 2025-09-16 19:33:55 -04:00
BVBFuchs 7bcab60f3e Update de-DE.ts (#2128) 2025-09-15 11:59:10 -07:00
siaikin e77a051144 feat(analytics): add support for Vercel Web Analytics provider (#2119)
* feat(analytics): add support for Vercel Web Analytics provider

* fix: correct indentation for Vercel analytics provider condition
2025-09-08 20:06:28 -07:00
Giuseppe Alfieri ecb3d92941 Fix: normalize chokidar paths for hot reload on Windows (#2120)
Hot reload was not updating pages when editing Markdown files inside subfolders on Windows only.
The issue was caused by inconsistent path separators from chokidar.
This patch ensures paths are normalized with toPosixPath before rebuild.
2025-09-07 11:58:47 -07:00
Lumen Yang 0a57d032a7 feat(typst): invert the math equation for typst rendered equation in darkmode (#2095)
There was no dark mode support for quartz equations in typst. This
commit implements such support in order for proper render of typst math
equation in dark mode.
2025-08-21 09:37:59 -07:00
Anson c2fb73e186 Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4 2025-08-19 00:49:28 -06:00
Paweł Świątkowski ebff6617bb Add pl translation for search placeholder (#2090) 2025-08-15 13:27:56 -07:00
John Barker e918f11652 feat: add support for matomo analytics (#2051)
* feat: Support Matomo as analytics provider (self-hosted)

* SPA support

* Don't use var

* inline

* Revert fixing issues outside of this change
2025-08-12 23:56:04 -04:00
Jacky Zhao 53d6e18e81 fix(a11y): aria-controls and role fixes 2025-08-03 22:44:35 -07:00
reagenzn 91059843ae fix(search): prevent Enter key handling during IME composition (#2070)
Add !e.isComposing check to Enter key handler in search functionality
to prevent unwanted navigation during Japanese/Asian text input composition
2025-08-01 11:57:32 -04:00
Emile Bangma efddd798e8 revert(graph): roll back changes due to issues with Safari (#2067)
* chore: remove unused dependency

* fix(graph): rolled back webgpu changes
2025-07-30 18:43:36 +02:00
Anson 79f9ab64f5 Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4 2025-07-15 22:56:51 -04:00
Abhi 059848f8b0 fix(rss): add cdata to escape html content for rss feed (#2046)
* add cdata to escape html content

* fix: remove redundant CDATA
2025-07-14 10:00:38 +02:00
Wen Taichi 7253557d2c fix(goatcounter): properly count SPA page hits (#2035)
1. Should not create new instance after count.js, as it already setup an
instance.
2. Script block would be removed when navigating with SPA, and it cause
count.js can not find endpoint by query. The solution is to set
endpoint manually.
2025-07-07 22:52:49 -04:00
Emile Bangma 40f30bef45 fix(emoji): duplicate mappings (#2042) 2025-07-07 06:18:29 -04:00
Emile Bangma 467896413f fix(emoji): added missing skintone variations to emoji map (#2040) 2025-07-04 19:37:20 +02:00