Commit Graph

145 Commits

Author SHA1 Message Date
3ce6aa49bf fix(ogImage): update socialImage path to include base URL if defined (#1858)
* fix(ogImage): update socialImage path to include base URL if defined

* feat(path): add function to check if a file path is absolute

* fix(ogImage): handle absolute paths for user defined og image paths

* docs(CustomOgImages): update socialImage property to accept full URLs

* fix(ogImage): typo

* fix(ogImage): improve user-defined OG image path handling

* Update docs/plugins/CustomOgImages.md

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

* Update quartz/plugins/emitters/ogImage.tsx

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

* refactor(path): remove isAbsoluteFilePath function

* fix(ogImage): update user-defined OG image path handling to support relative URLs

* feat(ogImage): enhance user-defined OG image path handling with absolute URL support

* refactor(ogImage): remove debug log for ogImagePath

* feat(path): add isAbsoluteURL function and corresponding tests

* refactor(path): remove unused URL import for isomorphic compatibility

---------

Co-authored-by: Karim H <karimh96@hotmail.com>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2025-03-21 16:49:56 -07:00
9316ddf2f5 fix(analytics): fix the load of the analytics scripts (#1865)
* fix(analytics): fix the load of the analytics scripts

* chore(lint): fix lint issues
2025-03-21 09:58:10 -07:00
25979ab216 feat(fonts): allow PageTitle to have its own font subset (#1848)
* fix(explorer): vertically center the Explorer toggle under mobile view

* Added a separate title font configuration

* Added googleSubFontHref function

* Applied --titleFont to PageTitle

* Made googleFontHref return array of URLs

* Dealing with empty and undefined title

* Minor update

* Dealing with empty and undefined title

* Refined font inclusion logic

* Adopted the googleFontHref + googleFontSubsetHref method

* Adaptively include font subset for PageTitle

* Restored default config

* Minor changes on configuration docs

* Formatted source code
2025-03-18 21:43:32 -07:00
e86544064c fix: parse parallelization chunk arg, inline b64 for og image 2025-03-16 15:12:40 -07:00
a737207981 perf: incremental rebuild (--fastRebuild v2 but default) (#1841)
* checkpoint

* incremental all the things

* properly splice changes array

* smol doc update

* update docs

* make fancy logger dumb in ci
2025-03-16 14:17:31 -07:00
0babbdf780 fix(contentPage): dont emit folders 2025-03-13 13:57:00 -07:00
5928d82a56 fix(og): search for font family properly 2025-03-13 12:11:27 -07:00
2c30abe457 fix(analytics): always use defer over async to account for document nav event 2025-03-13 10:48:03 -07:00
d9159e0ac9 feat: make og images an emitter to properly await image generation (#1826)
* checkpoint

* make emitters async generators

* fix

* custom font spec

* replace spinner, use disk cache for fonts

* use readline instead

* make og images look nice
2025-03-13 10:27:46 -07:00
270a5dc14a fix(explorer): show file name instead of slug if no file data (closes #1822) 2025-03-12 11:24:28 -07:00
a8001e9554 feat: support non-singleton explorer 2025-03-10 15:13:22 -07:00
5480269d38 perf(explorer): client side explorer (#1810)
* start work on client side explorer

* fix tests

* fmt

* generic test flag

* add prenav hook

* add highlight class

* make flex more consistent, remove transition

* open folders that are prefixes of current path

* make mobile look nice

* more style fixes
2025-03-09 14:58:26 -07:00
cc9704becc chore(deps): bump deps, silence internal punycode deprecation 2025-03-06 09:41:26 -08:00
2213424195 docs: make role of getQuartzComponents more clear and also make it optional 2025-03-05 18:34:02 -08:00
5b13ff2199 feat: support emitters defining external resources, emit link from contentindex directly 2025-03-05 18:16:24 -08:00
a1162b978a fix(analytics): spa tracking for other providers 2025-03-05 16:27:08 -08:00
c6f10b44f6 feat(rss): configurable RSS feed URL (#1806)
* feat(rss): configurable RSS feed URL

* Update docs/features/RSS Feed.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/features/RSS Feed.md

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2025-03-05 15:54:11 -08:00
6d350500f1 fix(goatcounter): properly count SPA page hits (#1718)
On the surface it seems that only google and plausible scripts handle
the SPA correctly - but I don't know if maybe others handle
window.history API themselves somehow or something like that.

However, I am trying out goatcounter and in it's docs I see that it
does no special SPA handling, so this has to be fixed.

Just doing the dynamic script thing on every nav seems to do the trick.
The script is not "spa-preserve" so they wouldn't accumulate - and when
I tried the "spa-preserve" + call goatcounter api route it didn't quite
work, they actually did accumulate
2025-02-27 16:35:19 -05:00
29c533a265 fix(aliases): wikilink resolution for aliases (#1681)
With markdownLinkResolution: "shortest", aka "+/- how Obsidian does it"
and given pages A and nested/B which has an alias Z, if you try to link
from A using [[Z]] it wouldn't work and get 404.

This is caused by alias slugs (nested/Z in this case, emitted by
AliasRedirects) not being present in the `allSlugs` list which is used
by the link transformer.

The fix is to compute the alias slugs in the frontmatter transformer
and add them to `allSlugs` there.
Also we store them in file data to avoid recomputing them when emitting
alias redirect pages.

Fixes #904

Note: given how currently the markdown/html transformers are ordered
this doesn't really work.

Given pages A and nested/B which has an alias Z, here's the order which
currently happens:

md-transformers(A) => html-transformers(A) =>
md-transformers(B) => html-transformers(B)

Since the nested/Z slug will get added when md-transformers(B) are run,
but the slugs are used by html-transformers(A) when resolving it's
links - the link [[Z]] in A will still 404

A fix for this is to split the parser into two stages - first apply the
md-transformers to all files, and only then apply html-transformers to
all files.

I did just that in a different commit, which is needed for this one to
work correctly.
2025-02-25 16:28:16 -05:00
2e6a675edd perf: reduce bundle size (closes #1607) (#1689) 2025-01-01 12:24:32 -08:00
7533d504dc fix(tags): Set consistent titles for tags with description pages (#1671) 2024-12-26 17:50:06 -07:00
1d2dc167f4 feat(folder): add intermediate folders pages (#1295)
Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
Co-authored-by: Aaron Pham <contact@aarnphm.xyz>
2024-10-25 12:52:33 -04:00
b8c46ba81a feat(analytics): clarity (#1446)
Add the code necessary for support of Microsoft clarity
2024-09-30 10:06:37 -07:00
4aaeb768d8 update cabin url (#1428) 2024-09-20 09:23:19 -07:00
247625c4f5 feat(layout): add afterBody 2024-07-09 19:09:31 -07:00
965425d54d docs + chore: cleanup custom sort ordering for folder + tag listings, add docs 2024-07-09 17:55:19 -07:00
ea92ed4f45 feat: Allow custom sorting of FolderPage and TagPage (#1250) 2024-07-09 17:42:33 -07:00
3faf2ff6f5 feat(analytics): Cabin analytics support (#1221)
* add cabin analytics

* fix formatting
2024-06-18 13:38:45 -07:00
d03fdc235a feat(analytics): Tinylytics support (#1118)
* add tinylytics support

* fix formatting

* add trailing semicolon for consistency
2024-05-06 09:30:21 -07:00
1f032f538b feat(analytics): PostHog support (#1072) 2024-04-08 18:43:09 -07:00
b4236e5142 feat(perf:fast-rebuilds): Stop mutating resources param in ComponentResources emitter (#977)
* Stop mutating resources param in ComponentResources emitter

* Add done rebuilding log for fast rebuilds

* Move google font loading to Head component

* Simplify code and fix comment
2024-03-09 16:42:23 -08:00
94a54698ab fix(resources): Use full path to font when cdnCache is false (#976) 2024-03-09 11:59:55 -05:00
3d4a94dda3 feat(analytics): Goatcounter support (#956)
* Add options to support goatcounter analytics

* goatcounter: support self-hosted

* Add to configuration docs for goatcounter settings

* use https instead of protocol-relative link for goatcounter js
2024-03-06 19:44:34 -08:00
f44e4d25e6 fix(tag): remove hash on main page (#969)
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
2024-03-06 18:24:50 -08:00
f200a0be22 fix: correct umami host for self-hosted (#939)
* fixed umami script path for self-hosted version

* Update quartz/plugins/emitters/componentResources.ts

Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>

---------

Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
2024-02-27 11:05:28 -05:00
345c347a56 chore: passing additional buildCtx to componentData (#914)
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
2024-02-22 17:51:07 -08:00
a67a8d7aa9 feat: implement getDependencyGraph for TagPage (#872)
* feat: implement getDependencyGraph for TagPage

* Only add file to dg if it has at least 1 tag
2024-02-19 13:58:15 -05:00
06e3f8b93d fix(style): introduce semiBoldWeight and various improvements to reduce CLS 2024-02-17 10:34:51 -08:00
5af707ea20 fix/feat(fast rebuild): re-render transclusions in normal and fastRebuild mode (#842)
* Re-render transclusions in normal watch mode

* Include transclusions in ContentPage getDependencyGraph

* Address PR comments
2024-02-17 09:45:01 -08:00
823d952922 feat: implement getDependencyGraph for AliasRedirects emitter (#860) 2024-02-15 19:50:48 -05:00
78a408c96a feat: implement getDependencyGraph for FolderPage (#849) 2024-02-15 19:50:33 -05:00
a7325eadc1 fix(analytics): umami custom host should be a string (closes #852) 2024-02-12 09:01:05 -08:00
226891b9b1 fix(fast rebuild): call only required emitters, don't always copy assets (#845)
* fix(fast rebuild): call only required emitters, don't always copy assets

* Type function
2024-02-11 12:20:44 -08:00
ab0e20b4d0 chore: refactor out and export endsWith 2024-02-11 10:57:24 -08:00
6ae0bb0908 chore: move fonts all into static folder (#835)
* chore: move fonts all into static folder

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

* Apply suggestions from code review

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

* chore: update formatter

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

---------

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2024-02-10 17:17:41 -05:00
fe353d946b feat(experimental): partial rebuilds (#716) 2024-02-09 10:07:32 -05:00
51818efc38 fix(umami): format correct string from custom hosts (#826) 2024-02-08 08:45:20 -08:00
330e322e48 feat(fonts): fetch before build (#817)
* feat: fetch google fonts before build

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

* Update quartz/plugins/emitters/componentResources.ts

* fix: fetching wolff2

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

* chore: remove request stylesheet

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

* fix: race condition

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

* chore: remove preconnect for static fonts

since we are already downloading fonts into public folder

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

* chore: remove deadcode

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

* chore: add options to gate for cdn caching

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

* Apply suggestions from code review

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

* chore: apply jacky's suggestion

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

* chore: add docs and only use one promise

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

* fix: fmt

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

* chore: remove deadcode

* chore: final touches

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

* revert: changes in theme.ts

* fix: styles and remove deadcode

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

---------

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2024-02-08 02:52:55 -05:00
36e4cc41a9 chore(i18n): refactor and cleanup (#805)
* checkpoint

* finish

* docs
2024-02-04 20:57:10 -08:00
45b93a80f4 fix: index setup, styling fixes 2024-02-01 22:22:06 -08:00