Commit Graph
13 Commits
Author SHA1 Message Date
Anton Bulakh bc5880ac33 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
Anton Bulakh 482ae4d8b8 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
Anton Bulakh e581bfc1df chore(styles): omit sass deprecation warnings (#1737)
update to newer API
2025-01-23 22:19:46 -05:00
Anton Bulakh c3d49b9dbf chore(build): separate markdown and html handling into two separate stages (#1675) 2025-01-07 15:33:34 -05:00
Anton Bulakh 43bcc7efc8 fix(tags): Dont consume a space before content tags (#1706) 2025-01-05 01:11:15 -05:00
Anton Bulakh c66ba5cbff fix(spa): Fix relative alias redirects (#1688) 2024-12-30 18:21:07 -08:00
Anton Bulakh c2505b7221 fix(search): Fix super-inconsistent preview widths in search previews (#1677)
Don't know if this was uncovered by my local setup or just nobody
noticed, but page previews were pretty wonky for me
2024-12-30 09:55:53 -08:00
Anton Bulakh fb2d4c9ce7 fix(spa): Normalize empty hrefs (#1695)
A final breadcrumb has an empty href, linking to the current page, but
the relative url normalization method missed those, making the link
appear broken in search previews and popovers.

Fixes #1690
2024-12-30 09:55:18 -08:00
Anton Bulakh 614679b533 fix(tags): Fix TagContent not sorting the page list when opening a tag (#1692) 2024-12-30 09:08:35 -08:00
Anton Bulakh 57a65323c7 fix(spa): handle HTML redirects for aliases (#1680) 2024-12-27 07:18:22 -07:00
Anton BulakhandAaron Pham 5c923d691a feat(backlinks): hide by default when empty (#1674)
Co-authored-by: Aaron Pham <[email protected]>
2024-12-26 21:05:35 -07:00
Anton Bulakh 7dea35d29c fix(tags): Set consistent titles for tags with description pages (#1671) 2024-12-26 17:50:06 -07:00
Anton Bulakh 4c8932a423 fix(tags): Show tag descriptions when hovering (#1670) 2024-12-26 06:50:54 -07:00