{"id":16429072,"url":"https://github.com/codeandweb/gatsby-mdx-autoheader-bug","last_synced_at":"2025-07-16T08:10:49.553Z","repository":{"id":140437834,"uuid":"349685530","full_name":"CodeAndWeb/gatsby-mdx-autoheader-bug","owner":"CodeAndWeb","description":"Repository to reproduce a bug in Gatsby","archived":false,"fork":false,"pushed_at":"2021-03-20T09:52:44.000Z","size":206,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T06:43:42.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeAndWeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-20T09:51:18.000Z","updated_at":"2021-03-20T09:52:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9cb809b-b785-4d6f-bb59-8c2437e278de","html_url":"https://github.com/CodeAndWeb/gatsby-mdx-autoheader-bug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodeAndWeb/gatsby-mdx-autoheader-bug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fgatsby-mdx-autoheader-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fgatsby-mdx-autoheader-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fgatsby-mdx-autoheader-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fgatsby-mdx-autoheader-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeAndWeb","download_url":"https://codeload.github.com/CodeAndWeb/gatsby-mdx-autoheader-bug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fgatsby-mdx-autoheader-bug/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265495450,"owners_count":23776632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T08:20:43.512Z","updated_at":"2025-07-16T08:10:49.518Z","avatar_url":"https://github.com/CodeAndWeb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gatsby mdx test project to reproduce a bug in TOC creation\n\nThis demo uses `gatsby-remark-autolink-headers` with `enableCustomId: true` to\ncreate headers with custom link targets:\n\n    # Header {#header}\n    ## SubHeader {#subheader}\n\nThe result is that the html code is produced as it should be: `{#header}` is removed,\nthe `id` is applied to the `\u003ch1\u003e`:\n\n    \u003ch1 id=\"header\" style=\"position: relative;\"\u003e\n        \u003ca href=\"#header\" aria-label=\"header permalink\" class=\"anchor before\"\u003e\u003c/a\u003e\n        Header\n    \u003c/h1\u003e\n\nBUT: The TOC is not using new IDs and headers:\n\n```graphql\nquery MyQuery {\n  allMdx {\n    nodes {\n      tableOfContents\n    }\n  }\n}\n```\n\n\n```json\n{\n  \"data\": {\n    \"allMdx\": {\n      \"nodes\": [\n        {\n          \"tableOfContents\": {\n            \"items\": [\n              {\n                \"url\": \"#header-header\",\n                \"title\": \"Header {#header}\",\n                \"items\": [\n                  {\n                    \"url\": \"#subheader-subheader\",\n                    \"title\": \"SubHeader {#subheader}\"\n                  }\n                ]\n              }\n            ]\n          }\n        }\n      ]\n    }\n  },\n  \"extensions\": {}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandweb%2Fgatsby-mdx-autoheader-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeandweb%2Fgatsby-mdx-autoheader-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandweb%2Fgatsby-mdx-autoheader-bug/lists"}