To maximize your productivity while editing the input YAML file, set up RenderCV's JSON Schema in your IDE. It will validate your inputs on the fly and give auto-complete suggestions.
=== "Visual Studio Code"
1. Install [YAML language support](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) extension.
2. Then the Schema will be automatically set up because the file ends with `_CV.yaml`.
RenderCV's input file consists of two parts: `cv` and `design`.
```yaml
cv:
...
YOUR CONTENT]
...
design:
...
YOUR DESIGN
...
```
The `cv` part contains only the content of the CV, and the `design` part contains only the design properties of the CV. That's how the design and content are separated.
### `cv` section of the YAML input
The `cv` section of the YAML input starts with generic information, as shown below:
```yaml
cv:
name: John Doe
email: johndoe@example.com
phone: "+905555555555"
website: https://example.com
label: Mechanical Engineer
location: Istanbul, Türkiye
```
None of the values above are required. You can omit any or all of them, and RenderCV will adapt to your input.
The real content of your CV is stored in a field called sections.
The `cv` part of the input contains your content, and the `design` part contains your design. The `design` part starts with the name of the theme. Currently, there are three built-in themes (`classic`, `sb2nov`, and `moderncv`), but custom themes can also be used (see below.)
```yaml
design:
theme: classic
```
Each theme has different options for design. `classic` and `sb2nov` almost use identical options, but `moderncv` is slightly different. Please use an IDE that supports JSON schema to avoid missing any available options for the theme (see above).
An example `design` part for a `classic` theme is shown below:
```yaml
design:
theme: classic
color: rgb(0,79,144)
disable_page_numbering: false
font_size: 10pt
header_font_size: 30 pt
page_numbering_style: NAME - Page PAGE_NUMBER of TOTAL_PAGES
page_size: a4paper
show_last_updated_date: true
text_alignment: justified
margins:
page:
bottom: 2 cm
left: 1.24 cm
right: 1.24 cm
top: 2 cm
section_title:
bottom: 0.2 cm
top: 0.2 cm
entry_area:
date_and_location_width: 4.1 cm
left_and_right: 0.2 cm
vertical_between: 0.12 cm
highlights_area:
left: 0.4 cm
top: 0.10 cm
vertical_between_bullet_points: 0.10 cm
header:
bottom: 0.2 cm
horizontal_between_connections: 1.5 cm
vertical_between_name_and_connections: 0.2 cm
```
## Using custom themes
RenderCV allows you to move your $\LaTeX$ CV code to RenderCV. To do this, you will need to create some files:
BURAYA FOLDER STRUCTURE GOSTERE, INPUT FILE I DA BELIRTEREK, YOUR_THEME SEKLINDE BIR DIRECTORY ALTINDA ZORUNLU TUM DOSYALARI GOSTER.
Each of these files is LaTeX code with some Python in it. These files allow RenderCV to create your CV out of the YAML input.
The best way to understand how they work is to look at the source code of built-in themes. For example, the content of `ExperienceEntry.j2.tex` for the `moderncv` theme is shown below:
```latex
\cventry{
((* if design.show_only_years *))<<entry.date_string_only_years>>((* else *))<<entry.date_string>>((* endif *))
}{
<<entry.position>>
}{
<<entry.company>>
}{
<<entry.location>>
}{}{}
((* for item in entry.highlights *))
\cvline{}{\small <<item>>}
((* endfor *))
```
The values between `<<` and `>>` are the names of Python variables, allowing you to write a LaTeX CV without writing any content. Those will be replaced with the values found in the YAML input. Also, the values between `((*` and `*))` are Python blocks, allowing you to use loops and conditional statements. The process of generating LaTeX files like this is called "templating," and it's achieved with a Python package called [Jinja](https://jinja.palletsprojects.com/en/3.1.x/).
### Creating custom theme options
If you want to have some `design` options under your YAML input file's `design` section for your custom theme, you can create a `__init__.py` file inside your theme directory.
For example, the `moderncv` theme's `__init__.py` file is shown below:
```python
from typing import Literal
import pydantic
class YourcustomthemeThemeOptions(pydantic.BaseModel):
theme: Literal["yourcustomtheme"]
option1: str
option2: str
option3: int
option4: bool
```
Then, RenderCV will parse your custom design options, and you can use these variables inside your `*.j2.tex` as shown below: