Skip to content

Commit f11fdc2

Browse files
committed
Merge branch 'staging' of https://github.com/Markkos89/academy into staging
2 parents abefc15 + a4e093f commit f11fdc2

File tree

29 files changed

+1152
-58
lines changed

29 files changed

+1152
-58
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ yarn-error.log*
3434
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
3535
.env
3636
.env*.local
37+
.env
3738

3839
# vercel
3940
.vercel

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "t3-app-siwe",
2+
"name": "academy-t3-dapp",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
@@ -35,6 +35,7 @@
3535
"framer-motion": "^10.12.17",
3636
"next": "^13.4.7",
3737
"next-auth": "^4.22.1",
38+
"next-seo": "^6.1.0",
3839
"react": "18.2.0",
3940
"react-dom": "18.2.0",
4041
"react-icons": "^4.10.1",

src/components/Layout.tsx

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,54 @@
11
import { Box } from "@chakra-ui/react";
22
import Topbar from "./Topbar";
33
import Footer from "./footer/Footer";
4+
import { NextSeo } from "next-seo";
45

56
interface Props {
67
children: React.ReactNode;
8+
title: string;
9+
description?: string;
710
}
811

9-
export default function Layout({ children }: Props) {
12+
export default function Layout({ children, title, description }: Props) {
1013
return (
1114
<>
15+
<NextSeo
16+
title={`Developer DAO Academy | ${title}`}
17+
description={description}
18+
openGraph={{
19+
type: "website",
20+
locale: "en_US",
21+
url: `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/landing-page-screenshot.png`,
22+
site_name: `Developer DAO Academy`,
23+
title: `Developer DAO Academy | ${title}`,
24+
description: `${description}`,
25+
images: [
26+
{
27+
url: `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/landing-page-screenshot.png`,
28+
alt: "Developer DAO Academy",
29+
type: "image/png",
30+
},
31+
],
32+
}}
33+
twitter={{
34+
handle: "@devdao_academy",
35+
site: "@devdao_academy",
36+
cardType: "summary_large_image",
37+
}}
38+
additionalLinkTags={[
39+
{
40+
rel: "icon",
41+
href: "/favicon/favicon.ico",
42+
},
43+
]}
44+
/>
1245
<Topbar />
1346
<Box
1447
as="main"
1548
p="1.25em"
1649
px="5%"
1750
mx={{ base: "2rem", md: "6rem", lg: "10rem" }}
51+
minH={{ base: "calc(75vh - 3.5rem)" }}
1852
>
1953
{children}
2054
</Box>

src/components/PageSeoLayout.tsx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { NextSeo } from "next-seo";
2+
3+
interface PageSeoLayoutProps {
4+
title: string;
5+
description?: string;
6+
children?: React.ReactNode;
7+
}
8+
9+
const PageSeoLayout = ({
10+
title,
11+
description,
12+
children,
13+
}: PageSeoLayoutProps) => {
14+
return (
15+
<>
16+
<NextSeo
17+
title={`Developer DAO Academy | ${title}`}
18+
description={description}
19+
openGraph={{
20+
type: "website",
21+
locale: "en_US",
22+
url: `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/landing-page-screenshot.png`,
23+
site_name: `Developer DAO Academy`,
24+
title: `Developer DAO Academy | ${title}`,
25+
description: `${description}`,
26+
images: [
27+
{
28+
url: `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/landing-page-screenshot.png`,
29+
alt: "Developer DAO Academy",
30+
type: "image/png",
31+
},
32+
],
33+
}}
34+
twitter={{
35+
handle: "@devdao_academy",
36+
site: "@devdao_academy",
37+
cardType: "summary_large_image",
38+
}}
39+
additionalLinkTags={[
40+
{
41+
rel: "icon",
42+
href: "/favicon/favicon.ico",
43+
},
44+
]}
45+
/>
46+
{children}
47+
</>
48+
);
49+
};
50+
51+
export default PageSeoLayout;

src/components/footer/Footer.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ export default function Footer() {
1616
// bg={useColorModeValue('#00000f', '#1d1e20')}
1717
color={useColorModeValue("gray.700", "gray.200")}
1818
as="footer"
19+
p="1.25em"
20+
px="5%"
21+
mx={{ base: "2rem", md: "6rem", lg: "10rem" }}
1922
>
2023
<Container
2124
as={Stack}

src/components/mdx/ContributorFooter.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ export function ContributorFooter({
2626
{authors.length > 1 ? "Authors" : "Author"}
2727
</Text>
2828
<VStack spacing={4} alignItems="left">
29-
{authors.map((contrib, idx) => {
30-
return (
31-
<Contributor key={idx} handle={contrib} avatarSize="2xl" />
32-
);
33-
})}
29+
{authors.map((contrib, idx) => (
30+
<Contributor key={idx} handle={contrib} avatarSize="2xl" />
31+
))}
3432
</VStack>
3533
</Box>
3634
)}
@@ -41,9 +39,9 @@ export function ContributorFooter({
4139
{reviewers.length > 1 ? "Reviewers" : "Reviewer"}
4240
</Text>
4341
<VStack spacing={4} alignItems="left">
44-
{reviewers.map((contrib, idx) => {
45-
return <Contributor key={idx} handle={contrib} avatarSize="lg" />;
46-
})}
42+
{reviewers.map((contrib, idx) => (
43+
<Contributor key={idx} handle={contrib} avatarSize="lg" />
44+
))}
4745
</VStack>
4846
</Box>
4947
)}
@@ -58,11 +56,9 @@ export function ContributorFooter({
5856
: "Additional Contributor"}
5957
</Text>
6058
<VStack spacing={4} alignItems="left">
61-
{contributors.map((contrib, idx) => {
62-
return (
63-
<Contributor key={idx} handle={contrib} avatarSize="lg" />
64-
);
65-
})}
59+
{contributors.map((contrib, idx) => (
60+
<Contributor key={idx} handle={contrib} avatarSize="lg" />
61+
))}
6662
</VStack>
6763
</Box>
6864
)}

src/pages/getting-started.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ const GettingStartedPage: NextPageWithLayout<Lessons> = () => {
264264
GettingStartedPage.getLayout = function getLayout(page: ReactElement) {
265265
return (
266266
<Layout
267-
// title="Dapp Starterkit Marketing Page" // DEV_NOTE: This is for the next-seo per page config
268-
// description="A marketing page for your dapp." // DEV_NOTE: This is for the next-seo per page config
267+
title="Dapp Page" // DEV_NOTE: This is for the next-seo per page config
268+
description="A page for your dapp." // DEV_NOTE: This is for the next-seo per page config
269269
>
270270
{page}
271271
</Layout>

src/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const Home: NextPageWithLayout = () => {
1010
Home.getLayout = function getLayout(page: ReactElement) {
1111
return (
1212
<Layout
13-
// title="Dapp Starterkit Marketing Page" // DEV_NOTE: This is for the next-seo per page config
14-
// description="A marketing page for your dapp." // DEV_NOTE: This is for the next-seo per page config
13+
title="Dapp Page" // DEV_NOTE: This is for the next-seo per page config
14+
description="A page for your dapp." // DEV_NOTE: This is for the next-seo per page config
1515
>
1616
{page}
1717
</Layout>

0 commit comments

Comments
 (0)