Conjugate variables in thermodynamics vs. Hamiltonian mechanics According to Wikipedia, the canonical coordinates $p, q$ of analytical mechanics form a conjugate variables' pair - not just a canonically conjugate one.
However, the "conjugate variables" I directly think of are the quantities of thermodynamics - e.g. Temperature and Entropy, etc.
So, why both these classes of variables are called "conjugate"? What is the relation among them?
 A: In thermodynamics, conjugate pairs are related by the Legendre transform (like $T$ and $S$, or $P$ and $V$). In classical mechanics, you use the Hamiltonian to get the conjugate variable in a slightly different way,  although the Lagrangian and Hamiltonian are related by the Legendre transform as well.
In general, conjugate variables are those which are related by some sort of transform, be it Legendre, Fourier, etc. That's why you will see the term used in a variety of contexts. I can't comment about the link you provided, and invite someone else to do so. 
A: *

*Conjugate variables $(q^i, p_i)$ are given in thermodynamics via contact geometry as the first law of thermodynamics $$\mathrm{d}U~=~ \sum_{i=1}^np_i\mathrm{d}q^i,\tag{1}$$ where $U$ is internal energy. See also Ref. 1 and this & this Phys.SE posts.

*Conjugate variables  $(q^i, p_i)$ are given in Hamiltonian mechanics via symplectic geometry as Darboux coordinates, i.e. the symplectic 2-form takes the form $$\omega ~=~\sum_{i=1}^n\mathrm{d}p_i\wedge \mathrm{d}q^i.\tag{2}$$
Hamilton's principal function $S(q,t)$ satisfies
$$ \mathrm{d}S~=~ \sum_{i=1}^np_i\mathrm{d}q^i-H\mathrm{d}t,\tag{3}$$
cf. Ref. 2.
References:


*

*S. G. Rajeev, A Hamilton-Jacobi Formalism for Thermodynamics, Annals. Phys. 323 (2008) 2265, arXiv:0711.4319.

*J. C. Baez, Classical Mechanics versus Thermodynamics, part 1 & part 2, Azimuth blog posts, 2012.
