Commit Graph
12 Commits
Author SHA1 Message Date
Anton BulakhandGitHub 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
Anton BulakhandGitHub 4e4930ef9c chore(styles): omit sass deprecation warnings (#1737)
update to newer API
2025-01-23 22:19:46 -05:00
Anton BulakhandGitHub c90dbacab0 chore(build): separate markdown and html handling into two separate stages (#1675) 2025-01-07 15:33:34 -05:00
Anton BulakhandGitHub b7a945e034 fix(tags): Dont consume a space before content tags (#1706) 2025-01-05 01:11:15 -05:00
Anton BulakhandGitHub a934397961 fix(spa): Fix relative alias redirects (#1688) 2024-12-30 18:21:07 -08:00
Anton BulakhandGitHub d9e36e60d1 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 BulakhandGitHub 46adb35966 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 BulakhandGitHub d88e43010a fix(tags): Fix TagContent not sorting the page list when opening a tag (#1692) 2024-12-30 09:08:35 -08:00
Anton BulakhandGitHub 99011cb1b0 fix(spa): handle HTML redirects for aliases (#1680) 2024-12-27 07:18:22 -07:00
05e6f05a50 feat(backlinks): hide by default when empty (#1674)
Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
2024-12-26 21:05:35 -07:00
Anton BulakhandGitHub 7533d504dc fix(tags): Set consistent titles for tags with description pages (#1671) 2024-12-26 17:50:06 -07:00
Anton BulakhandGitHub 69a0ddf733 fix(tags): Show tag descriptions when hovering (#1670) 2024-12-26 06:50:54 -07:00