You need simply to define a new command \httpslink
like
% makes a https hyperlink
% usage: \httpslink[optional text]{link}
\newcommand*{\httpslink}[2][]{% <=======================================
\ifthenelse{\equal{#1}{}}%
{\href{https://#2}{#2}}%
{\href{https://#2}{#1}}}
Then you can simply change the call of \httplink
to \httpslink
to get your wished result.
Please see the following MWE (important code changings marked with <======
):
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
% makes a https hyperlink
% usage: \httpslink[optional text]{link}
\newcommand*{\httpslink}[2][]{% <=======================================
\ifthenelse{\equal{#1}{}}%
{\href{https://#2}{#2}}%
{\href{https://#2}{#1}}}
% adds a social link to one's personal information (optional)
% usage: \social[<optional type>][<optional url>]{<account name>}
% where <optional type> should be either "linkedin", "twitter" or "github"
\RenewDocumentCommand{\social}{O{}O{}m}{% <=============================
\ifthenelse{\equal{#2}{}}%
{%
\ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httpslink[#3]{www.linkedin.com/in/#3}}}{}% <==========================================
\ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httpslink[#3]{www.twitter.com/#3}}} {}% <=====================
\ifthenelse{\equal{#1}{github}} {\collectionadd[github]{socials} {\protect\httpslink[#3]{www.github.com/#3}}} {}% <=====================
}
{\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}
\name{John}{Doe}
\social[linkedin]{reidhoffman}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}} {Description}
\end{document}
which gives you the wished result: https://www.linkedin.com/in/reidhoffman
. Please see that I changed the old protocolls httplink
to httpslink
also for all other possibilitys command \social
gave you to add social links to your cv ...