  Recently, constructions of optimal linear codes from simplicial complexes
have attracted much attention and some related nice works were presented. Let
$q$ be a prime power. In this paper, by using the simplicial complexes of
${\mathbb F}_{q}^m$ with one single maximal element, we construct four families
of linear codes over the ring ${\mathbb F}_{q}+u{\mathbb F}_{q}$ ($u^2=0$),
which generalizes the results of [IEEE Trans. Inf. Theory 66(6):3657-3663,
2020]. The parameters and Lee weight distributions of these four families of
codes are completely determined. Most notably, via the Gray map, we obtain
several classes of optimal linear codes over ${\mathbb F}_{q}$, including
(near) Griesmer codes and distance-optimal codes.
