Skip to content

Working with Kramdown

Josh Smith edited this page Jul 6, 2024 · 1 revision

What is Kramdown?

Kramdown is the markdown parsing library the app uses to convert the markdown files held in the curriculum repository into HTML that can be served by the application.

Editing Kramdown files

The code for the app's Kramdown setup can be found in lib/kramdown/. There's quite a bit of custom code here to get content sectioning and styling exactly how we want it.

If you're ever making edits to the code around Kramdown parsing, it's important to know that the step of converting the curriculum repo's raw markdown content to HTML is only performed with the curriculum:updated_content rake task. This means that you won't immediately see changes to this code in the lesson content without running that rake task. Usually a better way to test and iterate on your changes will be to use the Markdown Preview tool.