Skip to content
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

Wrong page titles in combination with jekyll-datapage-generator #157

Open
daysleeperrr opened this issue Jul 11, 2022 · 1 comment
Open

Comments

@daysleeperrr
Copy link

daysleeperrr commented Jul 11, 2022

Hello all. Thanks for the great plugin, I've been using it extensively across sites and it works great. However I ran into an issue. Not sure to report here or in the other project, as it seems to be an issue occurring when two plugins are used together.

I'm using jekyll-datapage-generator to generate pages based on a YAML datafile. These pages include a Jekyll-TOS element. Let's assume my data file has a list of countries:

AF:
  country_name: Afghanistan
AL:
  country_name: Albania

The page has h1/h2/h3's with the country name in it.

Somehow, TOC shows the country name of the previously generated country. So in this example, the Albania page has an H1 with Albania in it, but TOC will show the Afghanistan title. In addition, TOC doesn't add the href="#..." attribute that make the items clickable.

Is there any way to resolve this problem? I'm happy to provide an example if needed.

@daysleeperrr
Copy link
Author

In hindsight, this is a very low-priority issue. Because when the content is generated dynamically, it's easy to generate the TOC dynamically aswell without this plugin. Sorry for bothering - jekyll-toc is my go to solution, but might in this case not be necessary.

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

No branches or pull requests

1 participant