-
-
Notifications
You must be signed in to change notification settings - Fork 240
fix: anonymous missing template or render function warning #1353
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
Merged
whitep4nth3r
merged 3 commits into
npmx-dev:feat/atproto-blog-fe
from
jonathanyeong:feat/blog-fe-fixes
Feb 11, 2026
+121
−66
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
6eb0317
fix: register EmbeddableBlueskyPost during SSR to resolve anonymous c…
jonathanyeong b316bad
fix: use typed ATproto client when fetching bsky embeds
jonathanyeong e4b10c9
refactor: rename useAuthorProfiles to useBlueskyAuthorProfiles for cl…
jonathanyeong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import type { Author, ResolvedAuthor } from '#shared/schemas/blog' | ||
|
|
||
| /** | ||
| * Fetches author avatar URLs and profile links from the Bluesky API (AT Protocol). | ||
| * | ||
| * Makes a server-side request to `/api/atproto/bluesky-author-profiles`, which looks up | ||
| * each author's Bluesky profile to retrieve their avatar. Results are cached for 1 day. | ||
| * | ||
| * While the fetch is pending (or if it fails), returns authors with `avatar: null` | ||
| * and a constructed profile URL as fallback. | ||
| */ | ||
| export function useBlueskyAuthorProfiles(authors: Author[]) { | ||
| const authorsJson = JSON.stringify(authors) | ||
|
|
||
| const { data } = useFetch('/api/atproto/bluesky-author-profiles', { | ||
| query: { | ||
| authors: authorsJson, | ||
| }, | ||
| }) | ||
|
|
||
| const resolvedAuthors = computed<ResolvedAuthor[]>( | ||
| () => data.value?.authors ?? withoutBlueskyData(authors), | ||
| ) | ||
|
|
||
| return { | ||
| resolvedAuthors, | ||
| } | ||
| } | ||
|
|
||
| function withoutBlueskyData(authors: Author[]): ResolvedAuthor[] { | ||
| return authors.map(author => ({ | ||
| ...author, | ||
| avatar: null, | ||
| profileUrl: author.blueskyHandle ? `https://bsky.app/profile/${author.blueskyHandle}` : null, | ||
| })) | ||
| } |
2 changes: 1 addition & 1 deletion
2
app/plugins/bluesky-embed.client.ts → app/plugins/bluesky-embed.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "id": "com.atproto.identity.resolveHandle", | ||
| "defs": { | ||
| "main": { | ||
| "type": "query", | ||
| "errors": [ | ||
| { | ||
| "name": "HandleNotFound", | ||
| "description": "The resolution process confirmed that the handle does not resolve to any DID." | ||
| } | ||
| ], | ||
| "output": { | ||
| "schema": { | ||
| "type": "object", | ||
| "required": ["did"], | ||
| "properties": { | ||
| "did": { | ||
| "type": "string", | ||
| "format": "did" | ||
| } | ||
| } | ||
| }, | ||
| "encoding": "application/json" | ||
| }, | ||
| "parameters": { | ||
| "type": "params", | ||
| "required": ["handle"], | ||
| "properties": { | ||
| "handle": { | ||
| "type": "string", | ||
| "format": "handle", | ||
| "description": "The handle to resolve." | ||
| } | ||
| } | ||
| }, | ||
| "description": "Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document." | ||
| } | ||
| }, | ||
| "$type": "com.atproto.lexicon.schema", | ||
| "lexicon": 1 | ||
| } |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
By removing
.clientthis component will now appear during SSR for unplugin-vue-markdown to pick up when it's compiling the blog posts. But the<ClientOnly>tag should mean it's only rendered by the browser.Uh oh!
There was an error while loading. Please reload this page.
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.
.client.vuesuffix is equivalent to the Nuxt<ClientOnly>wrapper component, so they're interchangeable in this regard.https://nuxt.com/docs/4.x/directory-structure/app/components#client-components
unplugin-vue-markdown?app/plugins/bluesky-embed.tsbelow should already be doing the work of registering the component during the build process.Uh oh!
There was an error while loading. Please reload this page.
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.
They are very similar, but adding
.clientto the component means the entire component won't be available during SSR. While when we specifyClientOnlytag it's only applied at the usage site. So the component is still available during SSR withClientOnly.Yup!
That's true, my change doesn't do anything regarding registering the component. But we still need to import the plugin during ssr rather than only client side.
Side note: I was looking at unplugin-vue-components and this might be something we can add in the future so we don't have to explicitly import a global component.
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.
unplugin-vue-componentsin an earlier attempt but it was unsuccessful so more power to you if you get it to.