Add way to disable site modules in config

This commit is contained in:
Kevin Kandlbinder 2021-12-13 17:17:17 +00:00 committed by GitHub
parent a972bf6234
commit f704547b25
8 changed files with 359 additions and 210 deletions

View file

@ -18,6 +18,7 @@ import {
Loader,
} from "lucide-react";
import { useTranslation } from "react-i18next";
import useSiteMetadata from "../helpers/useSiteMetadata";
export const query = graphql`
query GetProjectsAndSkills($language: String) {
@ -98,6 +99,7 @@ export const query = graphql`
const AboutPage = (props) => {
const { t, i18n } = useTranslation();
const { modules } = useSiteMetadata();
let file = props.data.file;
@ -291,14 +293,16 @@ const AboutPage = (props) => {
</div>
</div>
</section>
<Link className={styles.donationSection} to="/donate">
<div>
<span>
<Trans>about.donationCatchphrase</Trans>
</span>
<ArrowRight />
</div>
</Link>
{modules.donation && (
<Link className={styles.donationSection} to="/donate">
<div>
<span>
<Trans>about.donationCatchphrase</Trans>
</span>
<ArrowRight />
</div>
</Link>
)}
</Layout>
);
};

View file

@ -45,6 +45,7 @@ export const query = graphql`
const ProjectsPage = ({ data }) => {
const { t } = useI18next();
const meta = useSiteMetadata();
return (
<Layout
title={t("project.plural")}