Skip to content

Resolve "Improve styling for codeblocks with unrecognized language formats"

What does this MR do and why?

Describe why, not just what. Include links to relevant issues or discussions.

In this MR,

A config called guessSyntax is added (in hugo.yml). This was missing previously, and was needed to capture more languages through Hugo.

image.png

image.png

With the guessSyntax config, test.md (mentioned in issue) is now fixed

BEFORE AFTER
image.png image.png

Screenshots, screen recordings, or links to review app

These are strongly recommended to assist reviewers and reduce the time to merge your change.

Resulting logs:

image.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. You could just run the script -> ./scripts/check-codeblocks.sh

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #119 (closed)

Edited by Hiru Fernando

Merge request reports

Loading