Skip to content

Commit 098bfba

Browse files
authored
Merge pull request #21 from code-star/main
Release
2 parents 8bd5bc1 + dc21d2a commit 098bfba

File tree

77 files changed

+9113
-5034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+9113
-5034
lines changed

.github/workflows/test.yml .github/workflows/staging.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to Test (https://code-star.github.io/codestar-website-next/)
1+
name: Deploy to Staging (https://staging.codestar.nl)
22

33
on:
44
push:
@@ -43,9 +43,9 @@ jobs:
4343
echo MASTODON_ACCESS_TOKEN=${{ secrets.MASTODON_ACCESS_TOKEN }} >> .env
4444
echo MASTODON_ID=${{ secrets.MASTODON_ID }} >> .env
4545
npm ci
46-
echo "{ \"basePath\": \"/codestar-website-next\" }" > config.json
47-
npx next build && npx next export
46+
npx next build
4847
touch out/.nojekyll
48+
# echo "{ \"basePath\": \"/codestar-website-next\" }" > config.json
4949
# CI: false # true -> fails on warning
5050
- name: Setup Pages
5151
uses: actions/configure-pages@v5

.gitignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
# dependencies
44
/node_modules
55
/.pnp
6-
.pnp.js
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
712

813
# testing
914
/coverage
@@ -25,8 +30,8 @@ yarn-debug.log*
2530
yarn-error.log*
2631
.pnpm-debug.log*
2732

28-
# local env files
29-
.env*.local
33+
# env files (can opt-in for committing if needed)
34+
.env*
3035

3136
# vercel
3237
.vercel

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![test](https://github.com/code-star/codestar-website-next/actions/workflows/test.yml/badge.svg)](https://github.com/code-star/codestar-website-next/actions/workflows/test.yml)
1+
[![staging](https://github.com/code-star/codestar-website-next/actions/workflows/staging.yml/badge.svg)](https://github.com/code-star/codestar-website-next/actions/workflows/staging.yml)
22

33
[![prod](https://github.com/code-star/codestar-website-next/actions/workflows/prod.yml/badge.svg)](https://github.com/code-star/codestar-website-next/actions/workflows/prod.yml)
44

@@ -29,9 +29,9 @@ Note: uses static site generation with [NextJS](https://nextjs.org/). As a conse
2929

3030
## Deploying
3131

32-
Merges to the `main` branch are automatically deployed to the test environment at https://code-star.github.io/codestar-website-next/ by Github Actions. This is served on Github pages from the `gh-pages` branch on this repo.
32+
Merges to the `main` branch are automatically deployed to the staging environment at https://staging.codestar.nl/ by Github Actions. This is hosted on Github pages.
3333

34-
Merges to the `production` branch are automatically deployed to the production environment at https://code-star.github.io by Github Actions. This is served on Github pages from the `main` branch on the https://github.com/code-star/code-star.github.io repo.
34+
Merges to the `production` branch are automatically deployed to the production environment at https://code-star.github.io by Github Actions. This is hosted on Github pages from the `main` branch on the https://github.com/code-star/code-star.github.io repo.
3535

3636
Settings for Github Actions:
3737

components/TweetCard/TweetCard.module.scss

-26
This file was deleted.

components/TweetCard/TweetCard.tsx

-38
This file was deleted.

components/WelcomeCard/WelcomeCard.module.scss

-15
This file was deleted.

eslint.config.mjs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [
13+
...compat.extends("next/core-web-vitals", "next/typescript"),
14+
];
15+
16+
export default eslintConfig;

lib/publications/getPublications.ts

-62
This file was deleted.

lib/twitter/getTweets.ts

-83
This file was deleted.

mdx-components.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { MDXComponents } from "mdx/types";
2+
import Image, { ImageProps } from 'next/image'
3+
4+
export function useMDXComponents(components: MDXComponents): MDXComponents {
5+
return {
6+
img: (props: ImageProps) => (
7+
// eslint-disable-next-line jsx-a11y/alt-text
8+
<Image
9+
sizes="100vw"
10+
style={{ width: '100%', height: 'auto' }}
11+
{...props}
12+
/>
13+
),
14+
...components,
15+
};
16+
}

mdx.d.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export interface ArticleMetadata {
2+
title?: string;
3+
author?: string;
4+
publishedAt?: string;
5+
}
6+
7+
declare module "*.mdx" {
8+
let MDXComponent: (props) => JSX.Element;
9+
export default MDXComponent;
10+
11+
export const metadata: ArticleMetadata;
12+
}

next.config.js

-16
This file was deleted.

next.config.ts

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import type { NextConfig } from "next";
2+
import createMDX from "@next/mdx";
3+
import remarkFrontmatter from "remark-frontmatter";
4+
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
5+
6+
const nextConfig: NextConfig = {
7+
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
8+
reactStrictMode: true,
9+
images: { unoptimized: true },
10+
output: "export",
11+
};
12+
13+
const withMDX = createMDX({
14+
extension: /\.mdx?$/,
15+
options: {
16+
// turbopack does not yet support these plugins, see https://nextjs.org/docs/app/building-your-application/configuring/mdx#using-plugins-with-turbopack
17+
remarkPlugins: [
18+
remarkFrontmatter,
19+
[remarkMdxFrontmatter, { name: "metadata" }],
20+
],
21+
},
22+
});
23+
24+
export default withMDX(nextConfig);

0 commit comments

Comments
 (0)