Skip to content

Conversation

@JuliaEvseeva
Copy link
Contributor

@JuliaEvseeva JuliaEvseeva commented Dec 18, 2025

This PR brings the improvement for the block highlighting.

Screen.Recording.2025-12-18.at.15.35.33.mov

To highlight only the text without highlighting the entire line with background, use the following highlight shortcode:

{{< highlight class="hl-text-only" lang="text" params="hl_lines=10 19" >}}
// Code.
{{< /highlight >}}

Where:

  • class="hl-text-only" – the class that is used in the code theme to apply the appropriate styles.
  • lang – the code language.
  • hl_lines=10 19 – the lines that should be highlighted.

To highlight the full line, use:

{{< highlight lang="text" params="hl_lines=10 19" >}}
// Code.
{{< /highlight >}}

or

```text {hl_lines=[10,19]}
// Code.
```

The full guide will be added in the AUTHORING.md.

Also, this PR increases the required Hugo version that will also be updated in the main website. It is needed to fix the TOC rendering if the headings contains links.

@JuliaEvseeva JuliaEvseeva self-assigned this Dec 18, 2025
Base automatically changed from add-diagram-pdf to master December 18, 2025 14:47
@JuliaEvseeva JuliaEvseeva marked this pull request as ready for review December 18, 2025 14:48
@JuliaEvseeva JuliaEvseeva requested a review from armiol December 18, 2025 14:49
@JuliaEvseeva JuliaEvseeva added this pull request to the merge queue Dec 18, 2025
Merged via the queue into master with commit 3366926 Dec 18, 2025
2 checks passed
@JuliaEvseeva JuliaEvseeva deleted the fix-code-blocks branch December 18, 2025 16:09
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.

3 participants