A definition that always works and does agree with that one in the finite-dimensional case is the following: put
$$
C^k(\mathfrak{g})=({\Lambda}^k\mathfrak{g})^*=\operatorname{Hom}({\Lambda}^k\mathfrak{g}, \mathbb{F}).
$$
(Here $\mathbb{F}$ is the ground field, of course.)
The differential is given by the formula
$$
(d\phi)(g_1\wedge\dotsb\wedge g_{k+1})=\sum_{1\le i<j\le k+1}(-1)^{i+j-1}\phi([g_i,g_j]\wedge g_1\wedge\dotsb \wedge\widehat{g_i}\wedge\dotsb\wedge \widehat{g_j}\dotsb\wedge g_{k+1}),
$$
where the hat means missing the corresponding factor. If you define the product of cochains by the usual shuffle product formula, you will see that the differential is a derivation, and so all nice properties still hold. The main thing that breaks is precisely the identification $({\Lambda}^k\mathfrak{g})^*\cong {\Lambda}^k(\mathfrak{g}^*)$ used in the nlab page.
(See, for example, the classical reference Cohomology of Infinite-Dimensional Lie Algebras by D.B. Fuks.)
The statement about equivalence of categories does not extend, however, precisely because the cochain algebra is not generated by degree one elements. There are many different situations where things can be patched: many infinite-dimensional algebras have additional gradings with finite-dimensional components (and you can work in the corresponding monoidal category), sometimes all you need is continuous cochains on algebras that have some topology etc. Again, the book of Fuks details many of those situations.