  Given a $C^k$-smooth closed embedded manifold $\mathcal N\subset{\mathbb
R}^m$, with $k\ge 2$, and a compact connected smooth Riemannian surface $(S,g)$
with $\partial S\neq\emptyset$, we consider $\frac 12$-harmonic maps $u\in
H^{1/2}(\partial S,\mathcal N)$. These maps are critical points of the nonlocal
energy \begin{equation}E(f;g):=\int_S\big|\nabla\widetilde
u\big|^2\,d\text{vol}_g,\end{equation} where $\widetilde u$ is the harmonic
extension of $u$ in $S$. We express the energy as a sum of the $\frac
12$-energies at each boundary component of $\partial S$ (suitably identified
with the circle $\mathcal S^1$), plus a quadratic term which is continuous in
the $H^s(\mathcal S^1)$ topology, for any $s\in\mathbb R$. We show the
$C^{k-1,\delta}$ regularity of $\frac 12$-harmonic maps. We also establish a
connection between free boundary minimal surfaces and critical points of $E$
with respect to variations of the pair $(f,g)$, in terms of the Teichm\"uller
space of $S$.
