Skip to content

WIP: Switch from Redcarpet to Kramdown as markdown engine

username-removed-236961 requested to merge docs-kramdowm into master

What

Switch the markdown engine used for docs.gitlab.com from redcarpet to kramdown

Why

Kramdowm is the most featured markdown engine, which we use for about.gitlab.com for more than a year.

With it, we will have the ability to:

  • add custom styles to docs, e.g. blue and green info bars on GH docs
  • HTML will not be escaped, so we can add icons, divs, videos, iframes, etc
  • we will be able to add custom styles to docs, e.g., display images side-by-side
  • add custom ids and custom classes with kramdown markup {: #id .class}

See all the awesome stuff we can do with kramdown here in our markdown guide.

Kramdown is the engine recommended by Nanoc

How

As we are introducing frontmatter to our docs, although it's not supported by /help, I suggest we also add kramdown as markdown engine. It will not be rendered by /help, but will significantly improve the quality of our docs visual, design, and readability.

Todos

  • ToC with redcarpet is generated automatically, with kramdown we need to add special formatting to all docs...
  • Even when kramdown's special toc is used, it doesn't appear due to the JS involved that puts it in the sidebar.
  • Anchor links do not work (no # beside them that could be used to easily select them)
  • Port all the custom stuff defined in /lib/helpers_.rb
Edited by Achilleas Pipinellis

Merge request reports