Skip to content
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

Merged
merged 5 commits into from
Oct 14, 2020

Conversation

bencodezen
Copy link
Contributor

@bencodezen bencodezen commented Oct 13, 2020

Paired with @jlengstorf on this!

@bencodezen bencodezen marked this pull request as ready for review October 14, 2020 19:46
@bencodezen bencodezen requested a review from a team October 14, 2020 19:46
Copy link
Contributor

@jlengstorf jlengstorf left a 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`',
Copy link
Contributor

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';
Copy link
Contributor

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');
Copy link
Contributor

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,
Copy link
Contributor

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

Copy link
Contributor

@jlengstorf jlengstorf left a 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!

@jlengstorf jlengstorf changed the title feature (#92): integrate marketing copy with home page feature: integrate marketing copy with home page Oct 14, 2020
@jlengstorf jlengstorf merged commit 613d25c into main Oct 14, 2020
@jlengstorf jlengstorf deleted the bh/92/marketingCopy branch October 14, 2020 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants