mirror of
https://github.com/rendercv/rendercv.git
synced 2026-01-01 18:08:07 -05:00
1.5 KiB
1.5 KiB
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
SocialNetworkNametype. - If necessary, implement its username validation in the
SocialNetwork.check_usernamemethod. - Implement its URL generation using the
SocialNetwork.urlmethod. If the URL can be generated by appending the username to a hostname, only updateurl_dictionary. - Finally, include the
\LaTeXicon of the social network to theicon_dictionaryin theCurriculumVitae.connectionsmethod. RenderCV uses thefontawesome5package. 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.pyand updatetest_social_network_urlaccordingly, i.e., add a new(network, username, expected_url)tuple to thepytest.mark.parametrizedecorator. - Go to
tests/conftest.pyand add the new social network torendercv_filled_curriculum_vitae_data_model. - Set
update_testdatatoTrueinconftest.pyand run the tests to update thetestdatafolder. - Review the updated
testdatafolder manually to ensure everything works as expected. Then, setupdate_testdatatoFalseand push the changes.