Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions app/composables/useBlogPostBlueskyLink.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { Constellation } from '#shared/utils/constellation'
import { NPMX_SITE } from '#shared/utils/constants'
import { NPMX_SITE, NPMX_DID } from '#shared/utils/constants'

const BLOG_BACKLINK_TTL_IN_SECONDS = 60 * 5

// TODO: Remove did when going live
const TESTING_ROE_DID = 'did:plc:jbeaa5kdaladzwq3r7f5xgwe'
// const TESTING_BACKLINK_URL = 'https://roe.dev/blog/the-golden-thread'
// const NPMX_DID = 'did:plc:u5zp7npt5kpueado77kuihyz'

export interface BlogPostBlueskyLink {
did: string
rkey: string
Expand All @@ -21,7 +16,6 @@ export function useBlogPostBlueskyLink(slug: MaybeRefOrGetter<string | null | un
const s = toValue(slug)
if (!s) return null
return `${NPMX_SITE}/blog/${s}`
// return TESTING_BACKLINK_URL
})

return useAsyncData<BlogPostBlueskyLink | null>(
Expand All @@ -41,7 +35,7 @@ export function useBlogPostBlueskyLink(slug: MaybeRefOrGetter<string | null | un
1,
undefined,
true,
[[TESTING_ROE_DID]],
[[NPMX_DID]],
BLOG_BACKLINK_TTL_IN_SECONDS,
)

Expand All @@ -62,7 +56,7 @@ export function useBlogPostBlueskyLink(slug: MaybeRefOrGetter<string | null | un
1,
undefined,
true,
[[TESTING_ROE_DID]],
[[NPMX_DID]],
BLOG_BACKLINK_TTL_IN_SECONDS,
)

Expand Down
1 change: 1 addition & 0 deletions shared/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const CACHE_MAX_AGE_ONE_YEAR = 60 * 60 * 24 * 365
// API Strings
export const NPMX_SITE = 'https://npmx.dev'
export const NPMX_DOCS_SITE = 'https://docs.npmx.dev'
export const NPMX_DID = 'did:plc:u5zp7npt5kpueado77kuihyz'
export const BLUESKY_API = 'https://public.api.bsky.app'
export const BLUESKY_COMMENTS_REQUEST = '/api/atproto/bluesky-comments'
export const NPM_REGISTRY = 'https://registry.npmjs.org'
Expand Down
Loading