Every day of the week (DotW) of any day in the calendar can be determined by two things:
The DotW that December 31 falls on, and
Whether the current year is a leap year or not, for dates in the first two months.
The problem then simply becomes a problem of determining how many Friday the 13ths occur given the DotW that December 31 falls on.
Let the numbers $0$ to $6 \pmod 7$ correspond to the days from $\text{Sunday}$ to $\text{Saturday}$.
There's a well known table of values $T = (0,3,3,6,1,4,6,2,5,0,3,5)$ for determining the DotW offsets of the first day of each month relative to December 31, starting from January. For leap years, the first two values are set to $6$ and $2$ respectively instead.
If we add $d + 12$ to each of these numbers (where $d$ is the DotW of December 31), then we get the DotW of the 13th day of each month. If this is equal to $5$ for any month, then that day is a Friday. Therefore, supposing that December 31 of any year fell on weekday $d$, then any month $m$ that satisfied $T_m + d + 12 \equiv 5 \pmod 7$ (or just $T_m \equiv -d \pmod 7$) would be a month with a Friday the 13th.
That being said, we can now make a table of values for the number of Friday the 13ths a year $F(d)$ will have given the day DotW $d$ that December 31 is on (as well as $F'(d)$ for leap years):
$$\begin{array}{c|c|c} d & F(d) & F'(d) \\ \hline 0 & 2 & 1 \\ 1 & 1 & 1 \\ 2 & 1 & 2 \\ 3 & 3 & 2 \\ 4 & 1 & 1 \\ 5 & 2 & 2 \\ 6 & 2 & 3 \end{array}$$
At this point, we can make an estimate, based on the assumption that a year has an equal probability of being on any DotW and a $\frac 14$ probability of being a leap year, of the average number of Friday the 13ths a year could have:
$$p(L) = \frac 34 \left(\frac{12}{7}\right) + \frac 14 \left(\frac{12}{7}\right) = \frac {12}{7}$$
as well as the probability of each number occurring:
$$\begin{array}{c|c} F(d) & p(F(d)) \\ \hline 1 & \frac 37 \\ 2 & \frac 37 \\ 3 & \frac 17 \end{array}$$
The average is equal to $1.714285... \approx 1.72$, as the website you mentioned suggests.
However, because of a quirk in the Gregorian calendar by which there are only 97 leap years in a 400-year cycle, the days of the week don't cycle uniformly every 28 years, but every 400 years. This means that there's actually a frequency chart of the number of years a specific DotW will occur. Consulting a Dominical letter table reveals that each DotW has the following frequency $f(d)$ of December 31s that occur on it every 400 years:
$$\begin{array}{c|c|c} d & f(d) & f'(d) \\ \hline 0 & 43 & 13 \\ 1 & 43 & 15 \\ 2 & 44 & 13 \\ 3 & 43 & 14 \\ 4 & 44 & 14 \\ 5 & 43 & 13 \\ 6 & 43 & 15 \end{array}$$
If we multiply these numbers with the number of Friday the 13ths that occur on that type of year, we get the total number of Friday the 13ths that occur in a 400-year cycle, which is $685$. Therefore, a year has exactly $\frac{685}{400} = 1.7125$ Friday the 13ths on average.
We can also find how many years have two or three Friday the 13ths with this information – simply add up the $f(d)$ values that correspond to an $F(d)$ value of 2 or 3:
$$\begin{array}{c|c} F(d) & f(d) \\ \hline 1 & 173 \\ 2 & 169 \\ 3 & 58 \end{array}$$
So a year has a $\frac{173}{400} = 0.4325$ probability of having just one Friday the 13th, a $\frac{169}{400} = 0.4225$ probability of having two, and a $\frac{58}{400} = 0.145$ probability of having three.