the-mvm / the-mvm.github.io

The Minimum Viable Model website and Jekyll theme.
https://the-mvm.github.io
GNU General Public License v3.0
86 stars 398 forks source link

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

Open haitt00 opened 1 year ago

haitt00 commented 1 year ago

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):

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).