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

[next] Fixes #1463 - re-re-implements the About page w/ nextjs #1624

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

chrispinkney
Copy link
Contributor

Issue This PR Addresses

Fixes #1463

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

Been trying to research how to render an md file with NextJS, and AFAIK NextJS renders md files differently than Gatsby. Upon researching this further I found this neat library which not only renders md files, but allows you to inject JSX (TSX) code directly into the md file in question. When styling/MUI is finished for next, styling the about page should be nothing short of jovial.

Furthermore, I think the MDX lib pairs really nicely with how NextJS automagically creates routes based on present files in the pages directory. All I had to do was place the .mdx file alongside otherside the .tsx (currently only index.tsx) files and it renders @ localhost:8000/about out of the box.

I also had to create a next config file (see: next.config.js) to be able to import and read MD/MDX files (see: here)

I'm hesitant about a PR which introduces another dependency, so let me know what you think!

(Ignore the blue Hello text, that was me testing to see if a .tsx component would actually render.)
blue_hello

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@HyperTHD HyperTHD merged commit 9ef6b49 into Seneca-CDOT:master Jan 29, 2021
@chrispinkney chrispinkney deleted the issue-1463-again branch April 22, 2021 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: front-end area: nextjs Nextjs related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[next] create About page from Gatsby version
4 participants