-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: link previews #305
base: main
Are you sure you want to change the base?
feat: link previews #305
Conversation
wip: move parsing to markdown marked extension
f20722c
to
8a8a34d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good!
I've got one question below.
$effect(() => { | ||
data.page.html; | ||
untrack(() => { | ||
previewLinks(data.page.html).then((res) => (html = res)); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this effect necessary? If the HTML changes it should be when we go to another page and in that case the preview links will already have been rendered by the server right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be taken out. I noticed some delay when loading pages with a lot of link previews (largest page I tried had 10 links, but was also from my local connection to the link service), so the effect was there for a second attempt to resolve any links that timed out server-side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In hopes that the link service's caching should prevent issues after the first load, lets take it out for now and see how it does on the main site.
Adds link previews to articles. (closes #241)