-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactor to allow for more flexibility and customization options in the future #45
Conversation
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.
@@ -12,9 +13,31 @@ type Props = { | |||
title: string; | |||
description: string; | |||
heroImage?: string; | |||
posts: [] |
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.
posts: [] | |
posts: BlogPost[] |
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.
added in newest commit where i am now actually duplicating some of the astroDB runtime types for the DB tables. 🎉 and implemented your suggestion as well
… data used on multiple pages instead of just a string
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.
Looks good!
These changes are great, they will make it a lot easier to migrate towards ATP. LGTM! 🚀 |
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.
Aside from the ts yelling everything looks good to me.
//@ts-ignore | ||
const htmlContent = await renderMarked(markdownContent.value); | ||
//@ts-ignore | ||
htmlPreview.innerHTML = htmlContent; | ||
} else if (Config.contentRenderer === 'markdoc') { | ||
//@ts-ignore | ||
const htmlContent = await renderMarkDoc(markdownContent.value); | ||
//@ts-ignore |
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.
what's the issue with ts here?
//@ts-ignore | ||
const htmlContent = await renderMarked(markdownContent.value); | ||
//@ts-ignore | ||
htmlPreview.innerHTML = htmlContent; | ||
} else if (Config.contentRenderer === 'markdoc') { | ||
//@ts-ignore | ||
const htmlContent = await renderMarkDoc(markdownContent.value); | ||
//@ts-ignore |
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.
same question here
//@ts-ignore | ||
const htmlContent = await renderMarked(markdownContent.value); | ||
//@ts-ignore | ||
htmlPreview.innerHTML = htmlContent; | ||
} else if (Config.contentRenderer === 'markdoc') { | ||
//@ts-ignore | ||
const htmlContent = await renderMarkDoc(markdownContent.value); | ||
//@ts-ignore |
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.
yep, here as well.
//@ts-ignore | ||
const htmlContent = await renderMarked(markdownContent.value); | ||
//@ts-ignore | ||
htmlPreview.innerHTML = htmlContent; | ||
} else if (Config.contentRenderer === 'markdoc') { | ||
//@ts-ignore | ||
const htmlContent = await renderMarkDoc(markdownContent.value); | ||
//@ts-ignore |
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.
here as well.
!coauthor |
|
Working on topics discussed during the discord community call on May 1, 2024.
It adds a few useful tricks into the mix including moving the content render into a virtual component that is exported as well as setting up a proper d.ts file export using the AIK addDts() utility to allow the recognition of the new Virtual component Utilities "studiocms:components" as well as reorganizing the page routes as a start to creating a more flexible setup for the future!