How to evaluate $\int_0^1\frac{\log^2(1+x)}x\mathrm dx$? The definite integral
$$\int_0^1\frac{\log^2(1+x)}x\mathrm dx=\frac{\zeta(3)}4$$
arose in my answer to this question. I couldn't find it treated anywhere online. I eventually found two ways to evaluate the integral, and I'm posting them as answers, but they both seem like a complicated detour for a simple result, so I'm posting this question not only to record my answers but also to ask whether there's a more elegant derivation of the result.
Note that either using the method described in this blog post or substituting the power series for $\log(1+x)$ and using
$$\frac1k\frac1{s-k}=\frac1s\left(\frac1k+\frac1{s-k}\right)\;$$
yields
$$
\int_0^1\frac{\log^2(1+x)}x\mathrm dx=2\sum_{n=1}^\infty\frac{(-1)^{n+1}H_n}{(n+1)^2}\;.
$$
However, since the corresponding identity without the alternating sign is used to obtain the sum by evaluating the integral and not vice versa, I'm not sure that this constitutes progress.

I wrote this to answer a question which was deleted (before I posted) because the answers to this question answered that question.
$$
\begin{align}
\int_0^1\frac{\log(1+x)^2}x\,\mathrm{d}x
&=-2\int_0^1\frac{\log(1+x)\log(x)}{1+x}\,\mathrm{d}x\tag1\\
&=-2\sum_{k=0}^\infty(-1)^kH_k\int_0^1x^k\log(x)\,\mathrm{d}x\tag2\\
&=-2\sum_{k=0}^\infty(-1)^k\frac{H_k}{(k+1)^2}\tag3\\
&=-2\sum_{k=0}^\infty(-1)^k\left(\frac{H_{k+1}}{(k+1)^2}-\frac1{(k+1)^3}\right)\tag4\\[3pt]
&=-2\left(\frac58\zeta(3)-\frac34\zeta(3)\right)\tag5\\[6pt]
&=\frac14\zeta(3)\tag6
\end{align}
$$
Explanation:
$(1)$: integration by parts
$(2)$: $\frac{\log(1+x)}{1+x}=\sum\limits_{k=0}^\infty(-1)^{k-1}H_kx^k$
$(3)$: $H_{k+1}=H_k+\frac1{k+1}$
$(4)$: $\int_0^1x^k\log(x)\,\mathrm{d}x=-\frac1{(k+1)^2}$
$(5)$: $(7)$ from this answer
$(6)$: simplify
