Closed batuhan closed 2 years ago
improved todos, moved to the kanban board
this is a functional feature so closing the issue, will add new issues as bugs.
Reopening the issue as recent changes broke the functionality.
It's a debatable philosophical question whether I should open a new issue to track the regression. I probably should. But I'm the CTO so I'll let this slide
Links are mostly a behind the scenes feature to determine what the URL after the creator profile link (
saltana.com/username/$
orusername.com/$
for custom domains).Database:
id
(saltana core id schemelnk_dfh3794h
etc.)ownerId
(creatorId)slug
(url friendly slug,unique(ownerId,slug)
)type
(string)target
(either resource ID (ast_xyz
,doc_xyz
etc.) or URL (forredirection-*
types)created_at
updated_at
metadata
&platformData
but I wanna keep it simpleCurrently our API has a concept of links, written as a plugin on top of the
documents
model but Links is much simpler than what the documents service allows. See./services/core/src/plugins/links
for the plugin.Tasks
checkAvailability
method for slug checking)<CreatorLinkField />
component that checks if the slug is available & show the correct full url (saltana.com/username/$
orusername.com/$
for custom domains)implement different types of links
[x] redirection-302 (temporary redirect; not cached by browsers, for dynamic links like "latest YouTube video of my channel") & redirection-301 (permanent redirect; cached by browsers)
pages/[creator]/[link]/index.tsx#getServerSideProps
[x] document (custom page)
pages/[creator]/[link]/index.tsx#getServerSideProps
[x] asset (product)
pages/[creator]/[link]/index.tsx#getServerSideProps