Skip to content

BUG - Table of content links not working in post page #52

@haitt00

Description

@haitt00

Describe the bug
Table of content links does not work (only a couple of first links) in post page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Demo page to view the Deep Q Learning for Tic Tac Toe post
  2. Make sure you scroll out of the 'Background' section. From the table of content on the right sidebar click on the 'Background' section (the first section)
  3. The page is not navigated to the position of the 'Background' section

Expected behavior
The page should navigate to the position of the 'Background' section.

Desktop (please complete the following information):

  • OS: macOS 13.3.1
  • Browser: chrome
  • Version Version 112.0.5615.137 (Official Build) (x86_64)

Additional context
I believe the reason for this bug is because the table of content navigates to sections using html ids, and there are duplicated ids of html elements in page-content and in post-excerpt(which is extracted from page content).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions