Giter VIP home page Giter VIP logo

Comments (6)

timlrx avatar timlrx commented on July 22, 2024 1

@PsyGik it's probably too feature-packed for my liking haha but feel free to share the implementation and others can copy it if that's what they are looking for. If the code is not too long, you could consider adding it to the FAQ as well.

from tailwind-nextjs-starter-blog.

byungjin0826 avatar byungjin0826 commented on July 22, 2024 1

Thank you both for your responses(@PxlSyl @timlrx ). I am looking forward to using the floating TOC. I will refer to your implementation and make use of it.

from tailwind-nextjs-starter-blog.

timlrx avatar timlrx commented on July 22, 2024

It already exists, but it's an opt-in feature for each post so you can insert it where it fits best. Check out https://tailwind-nextjs-starter-blog.vercel.app/blog/new-features-in-v1#table-of-contents-component.

Just include the following component in your post: <TOCInline toc={props.toc} />. You can see an example in the raw markdown file as well.

from tailwind-nextjs-starter-blog.

PxlSyl avatar PxlSyl commented on July 22, 2024

Hi, yes it already exists. I recently implemented the toc feature as an automatic sidebar when navigating to the posts (I may modify it to make it optional) on my i18n version, the reason I did this is for long blog posts and accessibility: I think it's better to have a floating button that can trigger the toc component, than the TOC at the top of the posts. If @timlrx is okay, I may do some PR for some of the features I implemented :)

from tailwind-nextjs-starter-blog.

PxlSyl avatar PxlSyl commented on July 22, 2024

@PsyGik it's probably too feature-packed for my liking haha but feel free to share the implementation and others can copy it if that's what they are looking for. If the code is not too long, you could consider adding it to the FAQ as well.

Np, I'll try to do that. I was talking about some features like series or share components (not all features but some common ones), but it's really as you want :)

from tailwind-nextjs-starter-blog.

cxf213 avatar cxf213 commented on July 22, 2024

QQ_1720186414589
I believe having a TOC in the sidebar, similar to this, would be a good option.

from tailwind-nextjs-starter-blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.