-
Install dependencies
Navigate into your new site’s directory and start it up (require Node.js and npm)
npm install
-
Copy .env.example file
Copy the file and update the environment variables that need to be updated
cp .env.example .env
-
Start developing.
npm run dev
-
Open the source code and start editing!
Your site is now running at
http://localhost:3000
!
Add year-1 redirection in public-archive/netlify.toml
.
Run the following commands with the correct year:
NEXT_PUBLIC_ARCHIVE_YEAR=2024 npm run build:archive
npm run start:archive # Serve the archive, and go to the archive-2024 folder
Tag the latest commit.
git tag -a archive-XXXX -m "Archive XXXX"
Change the currentYear
in src/constants/site.ts
.
Change the src/app/2024
(year) folder name to the new year and edit the content of the pages.
Create past year redirection in ./netlify.toml
.
Add the past year in the src/constants/site.ts
file.
mdx
files name are used in the urls and thus matters for SEO. This means those files names should match the content and have a format compatible with URLs.
For this reason the _tools\slugify.ts
script will read the file content and create a filename compatible with URLs, and matching content.
From the project root you can run :
ts-node _tools/slugify.ts
This will notify the necessary changes.
If you want to apply the changes please run with --force
option.
Due to library contentlayer not being maintained, we switched to its fork contentlayer2.
This also means that some checks are made against the files content and if missing or erroneous, some types have to be changed. To do so we have the _tools\update_mdx_types.ts
script.
From the project root you can run :
ts-node _tools\update_mdx_types.ts
This will make the necessary changes.
(Note: default dry run + force flag to save could be added like on slugify script).