Skip to content

Conversation

@nathannewyen
Copy link

Add Pre and Post configuration options to customize the HTML wrapper around the table of contents.

This allows users to add custom elements like headings for accessibility:

[markup.tableOfContents]
  pre = '<nav id="TableOfContents"><h2>Contents</h2>'
  post = '</nav>'

The pre/post parameters are optional in ToHTML() for backward compatibility - existing templates continue to work without changes.

Fixes #8338

Add Pre and Post configuration options to customize the HTML wrapper
around the table of contents. This allows users to add custom elements
like headings for accessibility.

Example config:
[markup.tableOfContents]
  pre = '<nav id="TableOfContents"><h2>Contents</h2>'
  post = '</nav>'

The pre/post parameters are optional in ToHTML() for backward
compatibility - existing templates continue to work without changes.

Fixes gohugoio#8338
@gemini-code-assist
Copy link

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

@CLAassistant
Copy link

CLAassistant commented Dec 28, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

AI Detection Analysis 🔍

Confidence Score: 25%

Reasoning: The pull request adds new configuration options (pre/post HTML wrappers) to an open-source project, with carefully explained rationale and code changes. The tone is pragmatic, technically accurate, and formatted in a way that suggests knowledge of both the underlying system and the expectations of other developers. There is a clear reference to issue #8338, and the description integrates user-oriented benefits (such as accessibility enhancements) with implementation details, balancing clarity and precision—traits more typical of human authorship.

Key Indicators:

  • Contextual and user-focused rationale: mentions accessibility and backward compatibility.
  • Use of idiomatic language and concise phrasing typical of open-source collaboration.
  • Manual TOML example included, demonstrating real-world use.
  • Specific and in-place code modifications that reflect nuanced understanding of the codebase.
  • Fixes a known issue (Add pre/post config to ToC #8338), demonstrating integration into the project’s maintenance workflow.

These elements suggest a human developer familiar with both the technical domain and the collaborative practices of open-source development.

✅ No strong indicators of AI generation detected

@jmooring
Copy link
Member

Let's put this on hold per my comments here:
#8338 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants