This is the repo which runs speedcubingireland.com.
Firstly, make sure you have git, a recent version of Node.js, and Bun installed. You can also use a github codespace to get started.
To clone and enter the repo, run:
git clone https://github.com/speedcubing-ireland/speedcubingireland.com.git
cd speedcubingireland.comThen, install the dependencies:
bun installYou will need to set up a .env file in the root directory. You can use the .env.example file as a template.
To run the development server, run:
bun devOpen http://localhost:3000 with your browser to see the result.
This project uses Vitest for testing. Use bun run to execute the npm scripts, as bun test invokes Bun's native test runner which is incompatible with Vitest APIs.
To run tests in watch mode:
bun run testTo run tests once:
bun run test:runPages are located in the pages directory. Each page is a React component exported from a .tsx file.
The posts in the pages/posts are generated from the .mdx files. A basic post looks like this:
import Post from '../../components/posts/Post';
# Hello World
This is where the post content goes.
export default ({ children }) => <Post title="Post Title">{children}</Post>