footer_and_top_note
¶
render_footer_template(footer_template, *, locale, current_date, name, single_date_template, string_processors=None)
¶
Render footer by substituting placeholders and wrapping in Typst context block.
Why
Footers show page numbers and metadata on each page. Typst context blocks enable dynamic page number access. Template substitution handles localized dates and names before wrapping in required Typst syntax.
Example
Parameters:
-
footer_template(str) –Template with NAME, PAGE_NUMBER, TOTAL_PAGES, CURRENT_DATE placeholders.
-
locale(Locale) –Locale for date formatting.
-
current_date(date) –Date for timestamp.
-
name(str | None) –CV owner name for placeholder substitution.
-
single_date_template(str) –Template for date formatting.
-
string_processors(list[Callable[[str], str]] | None, default:None) –Optional processors for markdown parsing and formatting.
Returns:
-
str–Typst context block with rendered footer content.
Source code in src/rendercv/renderer/templater/footer_and_top_note.py
render_top_note_template(top_note_template, *, locale, current_date, name, single_date_template, string_processors=None)
¶
Render top note by substituting placeholders and applying string processors.
Why
Top notes display generation metadata like "Last Updated: Jan 2025" at document top. Template-based generation allows localization and custom formatting per user preference.
Example
Parameters:
-
top_note_template(str) –Template with CURRENT_DATE, LAST_UPDATED, NAME placeholders.
-
locale(Locale) –Locale providing last_updated translation.
-
current_date(date) –Date for timestamp.
-
name(str | None) –CV owner name for placeholder substitution.
-
single_date_template(str) –Template for date formatting.
-
string_processors(list[Callable[[str], str]] | None, default:None) –Optional processors for markdown parsing and formatting.
Returns:
-
str–Rendered top note with substituted placeholders.