Skip to content

Commit 8c986fa

Browse files
committed
Add opengraph and other metatags
1 parent 5b5a98a commit 8c986fa

24 files changed

+353
-47
lines changed

example.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
# Application urls
12
NEXT_PUBLIC_BACKEND_URL=https://backend.commitrocket.com
3+
NEXT_PUBLIC_FRONTEND_URL=https://www.commitrocket.com
4+
5+
# Google analytics
26
NEXT_PUBLIC_GOOGLE_ANALYTICS_TAG_ID= [[ SOME GOOGLE ANALYTICS TAG ID]]

next.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ const bundleAnalyzer = withBundleAnalyzer({
1010
/** @type {import('next').NextConfig} */
1111
const nextConfig = {
1212
reactStrictMode: true,
13-
compress: true,
14-
output: "export"
13+
compress: true
1514
};
1615

1716
export default withPlugins([bundleAnalyzer], nextConfig);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7-
"build": "next build",
7+
"build": "next build && next export",
88
"analyze:build": "cross-env ANALYZE=true npm run build",
99
"analyze:dev": "cross-env ANALYZE=true npm run dev",
1010
"script:gen-articles-index": "node ./scripts/generateArticlesIndex.js"

src/assets/images/icons/discord.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { SVGProps, forwardRef, ForwardedRef } from "react";
1+
import { SVGProps, forwardRef, ForwardedRef } from "react";
22

33
const DiscordIcon = forwardRef((props: SVGProps<SVGSVGElement>, ref: ForwardedRef<SVGSVGElement>) => (
44
<svg

src/assets/state/articles/1.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export default {
1010
thumbnail,
1111
thumbnailAlt: "A placeholder thumbnail",
1212

13+
vertical: "technology",
14+
1315
slug: "1",
1416
tags: [
1517
tags.news,

src/assets/state/articles/2.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export default {
1111
thumbnail,
1212
thumbnailAlt: "A placeholder thumbnail",
1313

14+
vertical: "technology",
15+
1416
slug: "2",
1517
tags: [
1618
tags.git

src/assets/state/articles/article.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@ type IArticle = {
66
title: string;
77
thumbnail: StaticImageData,
88
thumbnailAlt: string;
9+
910
tags: string[];
11+
12+
/**
13+
* A high level overview of the article E.g. Technology
14+
*/
15+
vertical: string;
16+
1017
slug: string;
1118

19+
20+
1221
author: IMember;
1322

1423
teaser: string;

src/assets/state/contactMethods.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
import { ReactNode, RefAttributes, SVGProps } from "react";
2+
13
import NewsIcon from "@heroicons/react/24/solid/NewspaperIcon";
24
import EnvelopeIcon from "@heroicons/react/24/solid/EnvelopeIcon";
35
import PencilSquareIcon from "@heroicons/react/24/solid/PencilSquareIcon";
46

57
import DiscordIcon from "@/assets/images/icons/discord";
68

79

8-
import { ReactNode } from "react";
910

1011
interface IContactMethod {
1112
title: ReactNode;
1213
href?: string;
13-
icon: React.ForwardRefExoticComponent<any>;
14+
icon: React.ForwardRefExoticComponent<any> | React.FC<SVGProps<SVGSVGElement> & RefAttributes<SVGSVGElement>>;
1415
iconAlt: string;
1516
}
1617

src/assets/state/team.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import { StaticImageData } from "next/image";
22
import RikPicture from "@/assets/images/people/rik.webp";
33

44
export interface IMember {
5-
name: string;
5+
fullName: string;
6+
firstName?: string;
7+
lastName?: string;
8+
gender?: string; // Open Graph only accepts "male" & "female", but put in here whatever you want
69
title: string;
710
image: StaticImageData;
811
links: {
@@ -14,7 +17,7 @@ export interface IMember {
1417
export const people = {
1518
"rik": {
1619
image: RikPicture,
17-
name: "Rik den Breejen",
20+
fullName: "Rik den Breejen",
1821
title: "Lead Developer & Founder",
1922
links: [
2023
{

src/components/head/KeywordsMeta.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export interface KeywordTagsProps {
2+
tags: readonly string[];
3+
}
4+
5+
const KeywordsMeta = ({ tags }: KeywordTagsProps) => (
6+
<meta
7+
name="keywords"
8+
content={tags.map((tag) => tag.replace(",", "")).join(", ")}
9+
/>
10+
);
11+
12+
export default KeywordsMeta;

0 commit comments

Comments
 (0)