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: add truncateByWords lib #2446

Merged
merged 1 commit into from
Apr 8, 2023
Merged

feat: add truncateByWords lib #2446

merged 1 commit into from
Apr 8, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Apr 8, 2023

What does this PR do?

🤖 Generated by Copilot at dd23d71

This pull request adds a truncateByWords function to the lib folder and uses it to shorten the texts for the profile, publication, and shared components in the prerender app. This improves the SEO, user interface, and performance of the prerendered pages.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at dd23d71

  • Add truncateByWords function to lib folder to shorten texts by words (link)
  • Import and apply truncateByWords function to profile bio and description for meta tags and page display in Profile.tsx (link, link, link)
  • Import and apply truncateByWords function to publication content for meta tags in Publication.tsx (link, link)
  • Import and apply truncateByWords function to publication content for shared component in SinglePublication.tsx (link, link, link)
  • Reduce the limit of comments fetched for publication page from 50 to 30 in posts/[id].tsx to improve prerendering performance (link)
  • Reduce the limit of publications fetched for profile page from 50 to 30 in u/[handle].tsx to improve prerendering performance (link)

Emoji

🚀✂️📝

@vercel
Copy link

vercel bot commented Apr 8, 2023

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

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview Apr 8, 2023 1:30pm
web ✅ Ready (Inspect) Visit Preview Apr 8, 2023 1:30pm

@bigint bigint enabled auto-merge (squash) April 8, 2023 13:28
@vercel vercel bot temporarily deployed to Preview – prerender April 8, 2023 13:30 Inactive
@bigint bigint merged commit d6cc65e into main Apr 8, 2023
@bigint bigint deleted the fix-bing-issues branch April 8, 2023 13:36
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

1 participant