docs/user_guide/how_to/override_default_templates.md
When design options don't provide enough control, you can override the default Typst templates to fully customize your CV's appearance.
Use template overriding when you need to:
design.templates allowsFor simpler customizations, try these first:
design for colors, fonts, spacingdesign.templates for changing entry text layoutUse this when you want to tweak an existing theme's templates without creating a full custom theme.
Create templates alongside your CV:
rendercv new "Your Name" --create-typst-templates
This creates:
Your_Name_CV.yaml
classic/
Preamble.j2.typ
Header.j2.typ
SectionBeginning.j2.typ
entries/
NormalEntry.j2.typ
...
Modify any template file in the classic/ folder.
Render as usual:
rendercv render Your_Name_CV.yaml
RenderCV automatically uses your local templates instead of the built-in ones.
Use this when building a reusable theme with its own design options.
Create a custom theme:
rendercv create-theme mytheme
This creates:
mytheme/
__init__.py
Preamble.j2.typ
Header.j2.typ
SectionBeginning.j2.typ
entries/
NormalEntry.j2.typ
...
Modify template files and optionally add custom design options in __init__.py.
Use your theme in the YAML file:
design:
theme: mytheme
# Your custom design options work here
Render:
rendercv render Your_Name_CV.yaml
Templates use Jinja2 syntax with Typst code:
// Example: entries/NormalEntry.j2.typ
#regular-entry(
[
{% for line in entry.main_column.splitlines() %}
{{ line }}
{% endfor %}
],
[
{% for line in entry.date_and_location_column.splitlines() %}
{{ line }}
{% endfor %}
],
)
cv: All CV data (name, sections, etc.)design: All design optionslocale: Locale strings (month names, translations)entry: Current entry data (in entry templates)Example accessing design options:
// In Preamble.j2.typ
#show: rendercv.with(
page-size: "{{ design.page.size }}",
colors-body: {{ design.colors.body.as_rgb() }},
typography-font-family-body: "{{ design.typography.font_family.body }}",
// ...
)
Both methods also support Markdown template customization with --create-markdown-templates. The process is identical to Typst templates.