Skip to content

TOC Auto Heading -- datetime type #351

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

Closed
wants to merge 3 commits into from
Closed

TOC Auto Heading -- datetime type #351

wants to merge 3 commits into from

Conversation

invmy
Copy link

@invmy invmy commented Mar 27, 2025

TOC Auto Heading

image

datetime type

now, you can use str or date

image

Copy link

netlify bot commented Mar 27, 2025

👷 Deploy request for astro-theme-cactus pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1b6d627

@invmy invmy changed the title TOC Auto Heading TOC Auto Heading -- datetime type Mar 27, 2025
@chrismwilliams
Copy link
Owner

Hi @invmy, I think this will require bigger changes for it to get merged, unfortunately.

The problem is using the observer on post's headings, which results in a small target size and brings unintended issues, like some headings never being active, and others not active when the content is large and the heading is scrolled out of view. I think the headings will need to be grouped with associated content to fix this, which will probably require a remark plugin to fix highlighting issues. That would also help in reducing the dom nodes in the query.

For the smooth scrolling section, this is already added via css, and I've just added a target block margin so we don't need this part.

The datetime change should also probably be a separate pr too, I've mixed how dates are handled for some reason.

Hope that helps

@invmy invmy closed this Apr 15, 2025
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.

2 participants