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

feat(guide): parse and serialize markdown headings #9598

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

suneettipirneni
Copy link
Member

@suneettipirneni suneettipirneni commented May 26, 2023

Please describe the changes this PR makes and why it should be merged:

This adds the logic (no rendering yet) for parsing and serializing MDX headings into a tree-like structure.

🤖 Generated by Copilot at c2c0b38

  • Add headings field to Content schema to store heading data from Markdown files (link, link, link)
  • Import GithubSlugger module to generate slugs from heading texts (link, link)
  • Create ~/util/heading-node module to export interfaces and function for transforming heading data into a tree structure (link)
  • Import and use serializeHeadings function in Page component to create heading nodes from content.headings (link, link)
  • Add TODO comment for rendering headings in a table of contents in page.tsx (link)

@vercel
Copy link

vercel bot commented May 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2023 11:05pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Jun 1, 2023 11:05pm

@github-actions
Copy link

github-actions bot commented May 26, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 83
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 94
🟠 PWA 70

Lighthouse ran on https://discord-js-guide-git-feat-guideserialize-markd-d2b0a9-discordjs.vercel.app/guide/home/introduction

@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #9598 (0a2c912) into main (9b06734) will decrease coverage by 0.18%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #9598      +/-   ##
==========================================
- Coverage   58.17%   58.00%   -0.18%     
==========================================
  Files         227      228       +1     
  Lines       14891    14935      +44     
  Branches     1130     1131       +1     
==========================================
  Hits         8663     8663              
- Misses       6188     6232      +44     
  Partials       40       40              
Flag Coverage Δ
brokers 63.16% <ø> (ø)
builders 98.69% <ø> (ø)
collection 99.87% <ø> (ø)
guide 0.00% <0.00%> (ø)
proxy 76.31% <ø> (ø)
rest 93.18% <ø> (ø)
util 98.49% <ø> (ø)
utilities 100.00% <ø> (ø)
voice 63.47% <ø> (ø)
website 0.00% <ø> (ø)
ws 53.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
apps/guide/src/app/guide/[...slug]/page.tsx 0.00% <0.00%> (ø)
apps/guide/src/util/heading-node.ts 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
apps/guide/src/util/heading-node.ts Outdated Show resolved Hide resolved
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

None yet

3 participants