Skip to content

Commit

Permalink
Merge branch 'main' into ui-outline-vpn-user-stats
Browse files Browse the repository at this point in the history
  • Loading branch information
koechkevin committed Sep 19, 2024
2 parents 54accf5 + fea32c0 commit 60c2318
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ ARG NEXT_TELEMETRY_DISABLED \
NEXT_PUBLIC_APP_NAME="charterAFRICA" \
NEXT_PUBLIC_APP_URL \
NEXT_PUBLIC_SENTRY_DSN \
NEXT_PUBLIC_SEO_DISABLED \
# Payload (runtime)
MONGO_URL \
# TODO(koech): Standadise naming of Payload Secret. Our options:
Expand All @@ -167,6 +168,7 @@ COPY apps/charterafrica ./apps/charterafrica/

# When building Next.js app, Next.js needs to connect to local Payload
ENV PAYLOAD_PUBLIC_APP_URL=http://localhost:3000
ENV NEXT_PUBLIC_SEO_DISABLED=${NEXT_PUBLIC_SEO_DISABLED}
RUN pnpm --filter "./apps/charterafrica/" build-next

# When building Payload app, Payload needs to have final app URL
Expand Down
2 changes: 1 addition & 1 deletion apps/charterafrica/contrib/dokku/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM codeforafrica/charterafrica-ui:0.1.31
FROM codeforafrica/charterafrica-ui:0.1.33
2 changes: 1 addition & 1 deletion apps/charterafrica/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "charterafrica",
"version": "0.1.31",
"version": "0.1.33",
"private": true,
"author": "Code for Africa <[email protected]>",
"description": "This is the official code for https://charter.africa site",
Expand Down
9 changes: 5 additions & 4 deletions apps/engineeringblog/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { CssBaseline, ThemeProvider } from "@mui/material";
import { AppRouterCacheProvider } from "@mui/material-nextjs/v13-appRouter";
import { GoogleAnalytics } from "@next/third-parties/google";
import type { Metadata } from "next";

import logoLight from "@/engineeringblog/assets/images/logo-light.png";
import Footer from "@/engineeringblog/components/Footer";
import NavBar from "@/engineeringblog/components/NavBar";
import theme from "@/engineeringblog/theme";

import { getSettings } from "@/engineeringblog/lib/data";
import logoLight from "@/engineeringblog/assets/images/logo-light.png";
import theme from "@/engineeringblog/theme";

export const metadata: Metadata = {
title: "Technology | Code for Africa",
Expand All @@ -20,7 +20,7 @@ export default async function RootLayout({
}: Readonly<{
children: React.ReactNode;
}>) {
const { connect, primaryNavigation, secondaryNavigation } =
const { analytics, connect, primaryNavigation, secondaryNavigation } =
await getSettings();
// TODO: blurWidth/blurHeight https://github.com/vercel/next.js/issues/56511
const { blurWidth, blurHeight, ...logoProps } = logoLight;
Expand All @@ -46,6 +46,7 @@ export default async function RootLayout({
</ThemeProvider>
</AppRouterCacheProvider>
</body>
<GoogleAnalytics gaId={analytics?.analyticsId} />
</html>
);
}
2 changes: 2 additions & 0 deletions apps/engineeringblog/content/site/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ connect:
url: https://www.instagram.com/code4africa__/
- platform: Github
url: https://github.com/CodeForAfrica
analytics:
analyticsId: "G-TN1WGZVHLE"
---
6 changes: 6 additions & 0 deletions apps/engineeringblog/lib/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,23 @@ interface SecondaryNavigationProps extends NavigationProps {
copyright: string;
}

export type AnalyticsProps = {
analyticsId: string;
};

type SettingsProps = {
title: string;
primaryNavigation: PrimaryNavigationProps;
secondaryNavigation: SecondaryNavigationProps;
connect: ConnectProps;
analytics: AnalyticsProps;
};

async function readSettingsFile(filePath: string): Promise<SettingsProps> {
const { data } = await readMdFile(filePath);

return {
analytics: data.analytics,
connect: data.connect,
primaryNavigation: data.primaryNavigation,
secondaryNavigation: data.secondaryNavigation,
Expand Down
1 change: 1 addition & 0 deletions apps/engineeringblog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@mui/material-nextjs": "catalog:",
"@mui/utils": "catalog:",
"@next/mdx": "catalog:",
"@next/third-parties": "catalog:",
"date-fns": "catalog:",
"gray-matter": "catalog:",
"@types/mdx": "catalog:",
Expand Down
9 changes: 6 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 60c2318

Please sign in to comment.