Skip to content

Fix in-page anchors broken by the HonKit migration - #673

Merged
kenhys merged 1 commit into
fluent:1.0from
Watson1978:docs-fix-honkit-anchors
Aug 10, 2026
Merged

Fix in-page anchors broken by the HonKit migration#673
kenhys merged 1 commit into
fluent:1.0from
Watson1978:docs-fix-honkit-anchors

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

HonKit builds heading ids differently from GitBook: it drops backticks, <, > and _ from the heading text. The links written for GitBook therefore stopped resolving once #671 and #672 made HonKit the renderer for the published site.

heading GitBook id HonKit id
### add_http_headers`` add_http_headers addhttpheaders
### Section less-than-inject-greater-than-section inject-section

15 links across 6 files, 8 distinct anchors:

  • input/http.md #add_http_headers, #decompression_size_limit
  • input/syslog.md #source_host_key
  • output/http.md #allowed_hosts
  • output/exec_filter.md #less-than-{inject,extract}-greater-than-section
  • output/file.md #less-than-buffer-greater-than-section
  • deployment/system-config.md #less-than-source_only_buffer-greater-than-section

Verified by building the site with the repository's own configuration and matching every href="#..." against the id= and name= attributes on the same page. Before this change 8 of the 2366 in-page anchors did not resolve; after it, none are left.

The new ids were read out of the generated HTML rather than derived from the rule by hand.

HonKit builds heading ids differently from GitBook: it drops backticks,
`<`, `>` and `_` from the heading text. The links written for GitBook
therefore stopped resolving once fluent#671 and fluent#672 made HonKit the renderer
for the published site.

| heading                     | GitBook id                             | HonKit id      |
| --------------------------- | -------------------------------------- | -------------- |
| `### `add_http_headers``    | add_http_headers                       | addhttpheaders |
| `### `<inject>` Section`    | less-than-inject-greater-than-section  | inject-section |

15 links across 6 files, 8 distinct anchors:

* input/http.md               #add_http_headers, #decompression_size_limit
* input/syslog.md             #source_host_key
* output/http.md              #allowed_hosts
* output/exec_filter.md       #less-than-{inject,extract}-greater-than-section
* output/file.md              #less-than-buffer-greater-than-section
* deployment/system-config.md #less-than-source_only_buffer-greater-than-section

Verified by building the site with the repository's own configuration and
matching every `href="#..."` against the `id=` and `name=` attributes on
the same page. Before this change 8 of the 2366 in-page anchors did not
resolve; after it, none are left.

The new ids were read out of the generated HTML rather than derived from
the rule by hand.

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for fluentd-docs ready!

Name Link
🔨 Latest commit 4ac856b
🔍 Latest deploy log https://app.netlify.com/projects/fluentd-docs/deploys/6a7942c7efa6960008e978d0
😎 Deploy Preview https://deploy-preview-673--fluentd-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Watson1978
Watson1978 requested a review from kenhys August 10, 2026 03:17

@kenhys kenhys left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch

@kenhys
kenhys merged commit a72688f into fluent:1.0 Aug 10, 2026
6 checks passed
@Watson1978
Watson1978 deleted the docs-fix-honkit-anchors branch August 10, 2026 04:44
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.

2 participants