-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: Transcript Page feedback #70
base: staging
Are you sure you want to change the base?
fix: Transcript Page feedback #70
Conversation
@0tuedon is attempting to deploy a commit to the btc-knowledge-base Team on Vercel. A member of the Team first needs to authorize it. |
266ae54
to
71fbae7
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
71fbae7
to
2e2d329
Compare
const topicsWithTitles = topics.map(topic => { | ||
const currentTopic = allTopics.find( topicData => topicData.slug === topic ); | ||
return currentTopic; | ||
} ) | ||
|
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.
Can we handle this at the Contentlayer level? Specifically, replacing topic slugs with their full names during the Contentlayer processing step. This would eliminate the need to perform the replacement every time we display topic tags, such as on the source page, where this replacement is currently not accounted for:
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.
@0tuedon any update on this?
is the suggestion clear?
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.
Can we handle this at the Contentlayer level? Specifically, replacing topic slugs with their full names during the Contentlayer processing step. This would eliminate the need to perform the replacement every time we display topic tags, such as on the source page, where this replacement is currently not accounted for
But if we replace the topic slugs with their names then we need to to createSlug everytime we want a link?
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.
mmm, true.
For clarity, to get the topic name do we unsluggify or we have a lookup with the actual name?
cc: @kouloumos @0tuedon
what of using an object in contentLayer for tags, something like {name: "P2P", slug: "p2p"}
or as a new computedField
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.
Currently what I did, which @kouloumos pointed out is to find the topics by looping through allTopics and get the name for them. This only fixes it one place at a time.
To Test,
Link
This PR also closes #71