Skip to content

Resolve "Create a shortcode test page"

Hiru Fernando requested to merge 120-create-a-shortcode-test-page into main

What does this MR do and why?

  • This MR adds a test page in data/content called shortcode-tests.md.
  • Each test is separated by a level 2 header.
  • Each test represents an edge case such as nested tabs or nested shortcodes.
  • Additionally, data-pagefind-ignore="all" is added to where Content is rendered. This is to ignore this page when user wants to search using pagefind (archive search engine).

Why?

  • To identify markdown that causes Hugo markdown renderer "goldmark" to "fail" and not render the page properly.

Screenshots

WITHOUT PAGEFIND EXCLUSION WITH PAGEFIND EXCLUSION
image image

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. Go to http://localhost:1313/shortcode-tests/
  3. To test pagefind ignore run CI_COMMIT_REF_NAME=15.2 make view-archive and search for shortcode tests and make sure the results does not include this page. You can set pagefind_ignore: true to false to test that it shows up in the results and true to not show it in the results. If you change this though, make sure to rebuild completely. Otherwise pagefind indexing won't be updated.

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 #120 (closed)

Edited by Hiru Fernando

Merge request reports

Loading