timlrx / tailwind-nextjs-starter-blog

This is a Next.js, Tailwind CSS blogging starter template. Comes out of the box configured with the latest technologies to make technical writing a breeze. Easily configurable and customizable. Perfect as a replacement to existing Jekyll and Hugo individual blogs.
https://tailwind-nextjs-starter-blog.vercel.app/
MIT License
8.54k stars 1.98k forks source link

If summary is too long it will hide the entire blog #799

Closed BrentFM closed 9 months ago

BrentFM commented 9 months ago

When writing a few blogs, I noticed when the summary was too long, it would just hide the specific blog (Not shown anywhere).

To Reproduce I havent made significant changes to this so I believe this should occur for everyone - If not I can try to dig into what I've changed!

Expected behavior Just cut off at a certain limit

Additional context Inside of Main.tsx (within App), I did: {summary.length > 149 ? ${summary.substring(0, 149)}... : summary}

instead of {summary}

timlrx commented 9 months ago

This was intentional. I feel that it is better for a user to edit the summary to an appropriate length without having it be arbitrarily truncated. If you prefer to do it automatically, your suggested change works well!