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

docs: integrate contentful to F36 website #1973

Merged
merged 29 commits into from
Apr 5, 2022
Merged

Conversation

burakukula
Copy link
Contributor

@burakukula burakukula commented Mar 23, 2022

Adding contentful to Forma 36 website:

  • setup
  • moving content of introduction and guidelines to Contentful

TODO in the future:

  • dynamically generate side navigation based on category and subcategory
  • move tokens content to Contentful as well

@vercel
Copy link

vercel bot commented Mar 23, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/contentful-apps/forma-36/2VBYHyJKTgQR2mKtLU8ip62owWDZ
✅ Preview: https://forma-36-git-contentful-forma-website-contentful-apps.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Mar 23, 2022

⚠️ No Changeset found

Latest commit: 5795d1b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@burakukula burakukula marked this pull request as ready for review March 30, 2022 16:49
@burakukula burakukula changed the title feat: integrate contentful to F36 website docs: integrate contentful to F36 website Mar 30, 2022
`query {
kbAppArticleCollection(where: { slug_exists: true }) {
items {
${ARTICLE_GRAPHQL_FIELDS}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm gonna use simpler query over here. only thing we need here is slug, but on the separate PR.

Copy link
Contributor

@bgutsol bgutsol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 👏
No blockers, the only comment is that I would consider refactoring [...slug].tsx page as a follow-up.

for (const entry of links.entries.block) {
entryMap.set(entry.sys.id, entry);
}
return {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not use eslint anymore? For me it's all red
image

@@ -58,76 +53,142 @@ export default function ComponentPage({
</PropsContextProvider>
</>
);
};

// TODO: mrege Heading and getToC to getTableOfContents from 'mdx-utils'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you plan to do it in a separate story?

// [WIP]: I started adding stronger types to this function but I could not finish
// that's why I renamed some stuff here, I was trying to follow this:
// https://nextjs.org/docs/basic-features/typescript#static-generation-and-server-side-rendering
export const getStaticProps = async (context: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would separate some parts into functions because right now it's a bit hard to read and understand. For example the part with shortIntroText can be isolated

* refactor: improve ComponentPage typing

* refactor: move ToC utils to same file
Copy link
Collaborator

@Lelith Lelith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@burakukula burakukula merged commit e4e1235 into main Apr 5, 2022
@burakukula burakukula deleted the contentful-forma-website branch April 5, 2022 07:11
denkristoffer pushed a commit to Wake1st/forma-36 that referenced this pull request Oct 5, 2022
Co-authored-by: Gui Santos <guilherme.goncalvessantos@gmail.com>
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.

None yet

4 participants