[Tex/LaTex] How to add github link in moderncv template

moderncv

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.

Best Answer

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{john@doe.org}
\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