-
Notifications
You must be signed in to change notification settings - Fork 40
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
feature: integrate marketing copy with home page #164
Conversation
aec3828
to
1ee0ece
Compare
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.
one question + some context for the rest of the team
type: 'string', | ||
description: | ||
'Define a unique identifier for this content. Example: `home-hero`', |
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.
context for the @netlify/developer-experience team: our reasoning here is to treat this more like localization where you set up copy with a key in the code. this is necessary because our copy on the site doesn't follow the standard "one big block of content" model, so we need multiple copy blocks per page
@@ -1,24 +1,23 @@ | |||
import { loadMdxContent } from '@util/mdxServer'; | |||
import { renderMdxContent } from '@util/mdxClient'; |
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.
this is two files because of vercel/next.js#16153
@@ -30,3 +29,13 @@ export default function Home() { | |||
</Layout> | |||
); | |||
} | |||
|
|||
export async function getStaticProps() { | |||
const renderedContent = await loadMdxContent('jamstack-mission-control'); |
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.
should we rename this to something like loadCopyBlock
or something more outcome-driven vs. implementation-driven?
import Aside from '@components/mdx/Aside'; | ||
|
||
export default { | ||
Aside, |
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.
for @netlify/developer-experience: we can create custom components for use in marketing copy as long as we register them here
to use this component, we can do the following in Sanity's content area:
This is some content.
<Aside>
This is the content that should appear inside this custom component.
</Aside>
More content!
NOTE: the line breaks are significant here! without the extra line breaks, the text inside the custom component won't be parsed as Markdown
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.
I need this schema work to unblock other schema work, so I'm merging. we can revisit any feedback in a future issue!
Paired with @jlengstorf on this!