7

I'm trying to add github link and icon in moderncv classic template.

I'd like to add it to place at additional information. as in this image

I'm using :

\usepackage{fontawesome}
\faGithub\href{https://github.com/}{name} 

but it doesn't add at the specified place but it goes to another place.

link

link to code There are also .cls and several other .sty file. I'll add that if needed.

3
  • Welcome to TeX.SX! Please help others to help you by providing a complete but minimal example document that reproduces the problem you encounter.
    – siracusa
    Commented Sep 1, 2018 at 17:53
  • Thanks. I'm making changes in a template available on [sharelatex](sharelatex.com). Added the link. Commented Sep 1, 2018 at 17:57
  • Thank you for posting a working example! At the same time, much of your code does not seem to be relevant to the question you're asking here. Please limit the example to only the code required for your issue to appear. You can have a look at this guide for how to prune your code for this purpose. Commented Sep 1, 2018 at 18:22

1 Answer 1

14

Well, you have to change additional information to your wished content:

\extrainfo{\faGithub\href{https://github.com/}{ name}}% <===============

Please see with the current version of moderncv (version 2.0.0) you can use command

\social[github]{jdoe}

to add your github informations.

Please see the following MWE

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue} 

\usepackage[utf8]{inputenc}

\usepackage[scale=0.75]{geometry}
\usepackage{booktabs}
\usepackage{fontawesome}% <=============================================

% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe} % <===============================================
\extrainfo{\faGithub\href{https://github.com/}{ name}}% <===============
\photo[64pt][0.4pt]{example-image-a}
\quote{Some quote}

\setlength{\footskip}{66pt}


\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution--3}{City--4}{\textit{Grade}--5}{Description--6}  % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}

\end{document}

with the result:

enter image description here

2
  • Thank you. I found the solution for this but forgot to answer here. But I'm stuck on adding stackoverflow icon with link. Can I add it too? If there is one liner solution you can add here else I'll ask another question for that. Commented Oct 10, 2018 at 16:23
  • @Mensch Is there any recent documentation for the moderncv package? In CTAN only for v0.6 documentation is available.
    – ado sar
    Commented Oct 26, 2023 at 18:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .