Skip to content

Add table of contents support to ecosystem page #61595

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akafle01
Copy link

@akafle01 akafle01 commented Jun 7, 2025

This PR adds a table of contents to the Ecosystem page using the Markdown TocExtension.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes needed, but the general idea looks good, thanks for helping with this.

@@ -487,7 +488,15 @@ def main(
)
else:
body = markdown.markdown(
content, extensions=context["main"]["markdown_extensions"]
content,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of repeating this here, we should probably add the ecosystem page to this condition above: if "pdeps/" in fname:

@@ -1,4 +1,5 @@
# Ecosystem
[TOC]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[TOC]
[TOC]

@@ -45,6 +45,7 @@
from packaging import version
import requests
import yaml
from markdown.extensions.toc import TocExtension
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed if we follow the approach mentioned below

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.

WEB: Add table of content for the Ecosystem page
2 participants