Frequently Asked Questions (FAQ)¶
How can I add a new social network to RenderCV?¶
To add a new social network to RenderCV, go to the rendercv/data/models/curriculum_vitae.py
file and follow these steps:
- Append the social network name (for example, "Facebook") to the
SocialNetworkName
type. - If necessary, implement its username validation in the
SocialNetwork.check_username
method. - Implement its URL generation using the
SocialNetwork.url
method. If the URL can be generated by appending the username to a hostname, only updateurl_dictionary
. - Finally, include the $\LaTeX$ icon of the social network to the
icon_dictionary
in theCurriculumVitae.connections
method. RenderCV uses thefontawesome5
package. The available icons can be seen here.
Then, the tests should be implemented for the new social network with the following steps:
- Go to
tests/test_data.py
and updatetest_social_network_url
accordingly, i.e., add a new(network, username, expected_url)
tuple to thepytest.mark.parametrize
decorator. - Go to
tests/conftest.py
and add the new social network torendercv_filled_curriculum_vitae_data_model
. - Set
update_testdata
toTrue
inconftest.py
and run the tests to update thetestdata
folder. - Review the updated
testdata
folder manually to ensure everything works as expected. Then, setupdate_testdata
toFalse
and push the changes.