Skip to content

Commit 6517940

Browse files
authored
Merge branch 'main' into auto-update-yt-desc
2 parents 98f6b98 + ab1e3ce commit 6517940

File tree

210 files changed

+1148
-132
lines changed

Some content is hidden

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

210 files changed

+1148
-132
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Use Node.js ${{ matrix.node-version }}
1818
uses: actions/setup-node@v3
1919
with:
20-
node-version: '18.x'
20+
node-version: '20.x'
2121
cache: 'npm'
2222
- run: npm ci
2323
- run: npm test

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Here are the types of contributions we are looking for:
2323

2424
1. Share your creative work inspired by a coding challenge or tutorial in the showcase!
2525

26-
- You can submit your showcase with the [Passenger Showcase Form](http://thecodingtrain.com/submit)
26+
- You can submit your showcase with the [Passenger Showcase Form](https://thecodingtrain.com/submit)
2727

2828
2. Add a new track to the site! (https://github.com/CodingTrain/thecodingtrain.com/issues/279)
2929

@@ -49,4 +49,4 @@ To find an issue that you want to fix, scan through the list. You may find that
4949

5050
### Development Environment
5151

52-
Make sure you have Node.js version `18.x` as well as npm installed. You can find how to test your changes locally [here](https://github.com/CodingTrain/thecodingtrain.com#development-info).
52+
Make sure you have Node.js version `20.x` as well as npm installed. You can find how to test your changes locally [here](https://github.com/CodingTrain/thecodingtrain.com#development-info).

HACKTOBERFEST.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This Hacktoberfest, here are the ways you can contribute to The Coding Train:
44

55
1. **Share your creative work on the Passenger Showcase!**
66

7-
- For your submission to count towards Hacktoberfest, you must manually create a Pull Request to the website repository. You can follow along with the [Passenger Showcase Guide](http://thecodingtrain.com/guides/passenger-showcase-guide) (scroll down below the form) to create your Pull Request.
7+
- For your submission to count towards Hacktoberfest, you must manually create a Pull Request to the website repository. You can follow along with the [Passenger Showcase Guide](https://thecodingtrain.com/guides/passenger-showcase-guide) (scroll down below the form) to create your Pull Request.
88

99
2. **Curate content for the website**
1010

@@ -21,6 +21,7 @@ This Hacktoberfest, here are the ways you can contribute to The Coding Train:
2121
- You can contribute to other [Coding Train repositories](https://github.com/CodingTrain/) as well. You will need to ask for the Pull Request to be accepted for Hacktoberfest to count it towards your progress.
2222

2323
## Guide For Newer Contributors
24+
2425
If you are new to open source contributions, here are some useful resources that can help you get started:
2526

2627
- [Git and GitHub for Poets](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV): A Coding Train video series for Git and GitHub beginners.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Coding Train Website
22

33
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
45
[![All Contributors](https://img.shields.io/badge/all_contributors-24-orange.svg?style=flat-square)](#contributors-)
6+
57
<!-- ALL-CONTRIBUTORS-BADGE:END -->
68

79
This repo holds the website for [thecodingtrain.com](https://thecodingtrain.com/). The website is built with:
810

911
- [Gatsby](https://www.gatsbyjs.com/) to perform the static site rendering
10-
- [React](https://reactjs.org/) as the general JavaScript framework
12+
- [React](https://react.dev/) as the general JavaScript framework
1113

1214
## Table of Contents
1315

@@ -17,7 +19,7 @@ This repo holds the website for [thecodingtrain.com](https://thecodingtrain.com/
1719

1820
## Development info
1921

20-
When updating the website, it is helpful to run the website locally in order to quickly see the changes made. Make sure you have Node.js version `18.x` installed and then perform the following steps:
22+
When updating the website, it is helpful to run the website locally in order to quickly see the changes made. Make sure you have Node.js version `20.x` installed and then perform the following steps:
2123

2224
1. Clone down the repo to your computer and `cd` into the folder
2325
2. Run `npm install`

content-testing/schemas.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ const baseVideosSchema = strictObject({
2121
title: string().required(),
2222
description: string().required(),
2323

24-
videoId: youtubeIdValidator.when(['parts'], (parts, schema) => {
24+
videoId: youtubeIdValidator.when('parts', ([parts], schema) => {
2525
// videoId required if the `parts` array is missing or empty
26-
return parts && parts.length > 0 ? schema : schema.required();
26+
return parts && parts.length > 0
27+
? schema.test(
28+
'videoId and parts conflict',
29+
'Top-level "videoId" should not be defined if "parts" exist',
30+
(value) => value === undefined
31+
)
32+
: schema.required();
2733
}),
2834

2935
nebulaSlug: nonUrlStringValidator,
@@ -289,7 +295,7 @@ const socialGroup = strictObject({
289295
title: string().required(),
290296
links: array(
291297
strictObject({
292-
url: string().url().required(),
298+
url: urlOrRelativeLinkValidator.required(),
293299
site: string()
294300
.oneOf(['twitter', 'discord', 'instagram', 'youtube', 'github'])
295301
.required()

content-testing/validators.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ const relativeLinks = {
319319
'/guides': slugs.guides,
320320
'/showcase': new Set(),
321321
'/faq': new Set(),
322-
'/about': new Set()
322+
'/about': new Set(),
323+
'/discord': new Set()
323324
};
324325

325326
const urlOrRelativeLinkValidator = string().test(

content/pages/about/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"url": "https://www.youtube.com/c/TheCodingTrain/",
3737
"site": "youtube"
3838
},
39-
{ "url": "https://thecodingtrain.com/discord", "site": "discord" },
39+
{ "url": "/discord", "site": "discord" },
4040
{ "url": "https://github.com/CodingTrain", "site": "github" }
4141
]
4242
}

content/pages/challenges/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"title": "Challenges",
33
"description": "Ready to apply what you’ve learned in the Tracks? Try a Challenge! These one-off project videos build off concepts introduced in Tracks and may have prerequisites (listed on the challenge page itself).",
44
"featuredText": "Featured Challenge:",
5-
"featuredChallenge": "183-mathematical-marbling"
5+
"featuredChallenge": "185-dragon-curve"
66
}

content/pages/faqs/cafe-car.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"question": "Cafe Car",
33
"answer": {
4-
"text": "The Cafe Car is the place to meet and chat with the Coding Train community! Your first stop is the [Discord](https://thecodingtrain.com/discord), but we’d also love for you to say hi on [Twitter](https://twitter.com/thecodingtrain) and [Instagram](https://www.instagram.com/the.coding.train)!"
4+
"text": "The Cafe Car is the place to meet and chat with the Coding Train community! Your first stop is the [Discord](/discord), but we’d also love for you to say hi on [Twitter](https://twitter.com/thecodingtrain) and [Instagram](https://www.instagram.com/the.coding.train)!"
55
}
66
}

content/pages/faqs/find-help.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"question": "Where can I find help with my code?",
33
"answer": {
4-
"text": "We have a friendly and helpful community in the [Coding Train Discord](https://thecodingtrain.com/discord), which has a number of help channels. You can also visit [The Processing Foundation's forum](https://discourse.processing.org/), a great place to ask specific questions related to Processing and p5.js.",
5-
"list": [
6-
"[The Coding Train's Discord](https://thecodingtrain.com/discord)",
7-
"[The Processing Foundation's Forum](https://discourse.processing.org/)"
8-
]
4+
"text": "We have a friendly and helpful community in the [Coding Train Discord](/discord), which has a number of help channels. You can also visit [The Processing Foundation's forum](https://discourse.processing.org/), a great place to ask specific questions related to Processing and p5.js.",
5+
"list": ["[The Coding Train's Discord](/discord)", "[The Processing Foundation's Forum](https://discourse.processing.org/)"]
96
}
107
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"question": "Where and when do you live stream? Can I get a notification?",
33
"answer": {
4-
"text": "The best way to stay up to date on my schedule is to [join the Coding Train discord](https://thecodingtrain.com/discord) and subscribe to the “notifications” role.\n Live streams occur on both [Twitch](https://www.twitch.tv/codingtrainchoochoo) and [YouTube](https://www.youtube.com/c/TheCodingTrain/featured). Each platform has various options for receiving notifications. On YouTube, for example you can [subscribe to The Coding Train](https://www.youtube.com/c/TheCodingTrain) and click the bell for all notifications. For streams scheduled in advance, they’ll be listed on the [homepage of this website](/)."
4+
"text": "The best way to stay up to date on my schedule is to [join the Coding Train discord](/discord) and subscribe to the “notifications” role.\n Live streams occur on both [Twitch](https://www.twitch.tv/codingtrainchoochoo) and [YouTube](https://www.youtube.com/c/TheCodingTrain/featured). Each platform has various options for receiving notifications. On YouTube, for example you can [subscribe to The Coding Train](https://www.youtube.com/c/TheCodingTrain) and click the bell for all notifications. For streams scheduled in advance, they’ll be listed on the [homepage of this website](/)."
55
}
66
}

content/pages/faqs/suggest-topic.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"question": "How do I suggest a topic for a Coding Challenge or Track?",
33
"answer": {
4-
"text": "You can share ideas by [opening an issue in the Coding Train Suggestion Box](https://github.com/CodingTrain/Suggestion-Box) or by [joining the Coding Train discord](https://thecodingtrain.com/discord)."
4+
"text": "You can share ideas by [opening an issue in the Coding Train Suggestion Box](https://github.com/CodingTrain/Suggestion-Box) or by [joining the Coding Train discord](/discord)."
55
}
66
}

content/pages/guides/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If you are interested in learning web development, p5.js is a way to get started
3636

3737
<Video videoId="46WOuOrMwTQ" />
3838

39-
For a beginner, I recommend the [p5.js web editor](https://editor.p5js.org/), it’s probably the most used coding environment! If you are using Processing, it comes [with its own development environment](https://processing.org/download)! You can also explore a downloadable text editor like [Visual Studio Code](https://code.visualstudio.com/) for either! I cover tools beyond p5.js and Processing in [my 2023 workflow video](/tracks/2018-workflow/workflow/2023-update). There are many text editors out there – feel free to use whichever makes your coding experience comfortable!
39+
For a beginner, I recommend the [p5.js web editor](https://editor.p5js.org/), it’s probably the most used coding environment! If you are using Processing, it comes [with its own development environment](https://processing.org/download)! You can also explore a downloadable text editor like [Visual Studio Code](https://code.visualstudio.com/) for either! I cover tools beyond p5.js and Processing in [my 2023 workflow video](/tracks/2018-workflow/discord/2023-workflow). There are many text editors out there – feel free to use whichever makes your coding experience comfortable!
4040

4141
## Version Control
4242

content/pages/guides/maintain-website-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ git push --set-upstream origin branch-name
153153

154154
7. Check the links to the references and videos to make sure are not broken and add additional metadata. Add a link (s) to any archived Live Streams associated with the challenge.
155155

156-
- For accessibilty and for general clarity, ensure that all "description" properties in the index.json file as well as the contribution JSON files are filled in with at least 1 sentence.
156+
- For accessibility and for general clarity, ensure that all "description" properties in the index.json file as well as the contribution JSON files are filled in with at least 1 sentence.
157157
- Update the "languages" property in the "index.json" file. In this instance, "languages" refers to the programming language(s) used in the challenge. For example: "p5.js", "JavaScript", "Processing", or "node.js".
158158
- Update the "topics" property in the "index.json" file. If any tags were present on the YouTube page of the challenge, those would have been brought over by the web scraper and included as "topics". The tags from YouTube are pretty generic and overall too much information. Only a handful of topics are needed, so only include topics that are relevant to this specific video. If no tags were present on the YouTube page, then this may be blank - go ahead and add a couple of topics!
159159
- Use the Description on the YouTube video for additional links to add as "References" or "Videos" in the "groupLinks" property in the "index.json" file. Also, add in links to Uncyclopedia about whatever concept is being discussed, or links to p5.js or Processing documentation about any special functions that are used in the video, or links to whatever other resource may help to further explain a concept.
@@ -378,7 +378,7 @@ from GitHub.
378378
## Troubleshooting
379379

380380
Sometimes, things don't work like they should. If you get stuck, don't worry!
381-
Feel free to ask for help at any time, file an issue or come say hello in the [Coding Train Discord](https://thecodingtrain.com/discord).
381+
Feel free to ask for help at any time, file an issue or come say hello in the [Coding Train Discord](/discord).
382382

383383
## Adding a New Event
384384

content/pages/guides/passenger-showcase-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ There are currently two ways to submit your work:
1515

1616
<PassengerShowcaseForm />
1717

18-
If you have questions or need any help, come board the [Coding Train Discord](https://thecodingtrain.com/discord) or write to [email protected]. This guide is in progress, and will be updated as the showcase submission process changes.
18+
If you have questions or need any help, come board the [Coding Train Discord](/discord) or write to [email protected]. This guide is in progress, and will be updated as the showcase submission process changes.
1919

2020
## Finding the Video on GitHub
2121

content/pages/homepage/index.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
"title": "Challenges",
3232
"description": "Watch Dan take on Coding Challenges in p5.js and Processing. The challenge topics include algorithmic art, machine learning, simulation, generative poetry, and more.",
3333
"featured": [
34-
"183-mathematical-marbling",
35-
"41-clappy-bird",
36-
"148-gift-wrapping",
37-
"58-3d-earthquake-data-visualization",
38-
"101-may-the-4th-scrolling-text",
39-
"c1-maurer-rose"
34+
"185-dragon-curve",
35+
"175-3D-cube-applesoft-basic",
36+
"160-spring-forces",
37+
"113-4d-hypercube-aka-tesseract",
38+
"99-neural-network-color-predictor",
39+
"85-the-game-of-life"
4040
],
4141
"challengesCta": {
4242
"text": "ready to explore? try a challenge!",
@@ -46,16 +46,7 @@
4646
},
4747
"passengerShowcase": {
4848
"title": "Passenger showcase highlights",
49-
"featured": [
50-
"challenges/183-mathematical-marbling/showcase/contribution-1714718039.json",
51-
"challenges/183-mathematical-marbling/showcase/contribution-1715194171.json",
52-
"challenges/78-simple-particle-system/showcase/contribution-1714737129.json",
53-
"challenges/30-phyllotaxis/showcase/contribution-1714237829.json",
54-
"physics-libraries/box2d/3-coordinate-and-vectors/showcase/contribution-1714548437.json",
55-
"noc/3-angles/4-polar-coordinates/showcase/contribution-1714998108.json",
56-
"code/1-intro/3-shapes-drawing/showcase/contribution-1713756411.json",
57-
"challenges/181-image-stippling/showcase/contribution-1714302429.json"
58-
],
49+
"featured": ["challenges/184-elastic-collisions/showcase/contribution-1720963615.json", "challenges/184-elastic-collisions/showcase/contribution-1720958474.json", "noc/4-particles/4-particle-textures/showcase/contribution-1721161051.json", "physics-libraries/box2d/12-collision-events/showcase/contribution-1722000424.json", "challenges/14-fractal-trees-recursive/showcase/contribution-1723666252.json", "challenges/10-dfs-maze-generator/showcase/contribution-1720952091.json", "challenges/184-elastic-collisions/showcase/contribution-1721016798.json", "challenges/100-neuroevolution-flappy-bird/showcase/contribution-1720945862.json"],
5950
"showcaseCta": {
6051
"text": "Want to see more?",
6152
"buttonText": "Browse the full showcase",

content/tracks/main-tracks/ml5js-beginners-guide/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"chapters": [
77
{
88
"title": "Introduction",
9-
"videos": ["ml5/0-introduction/1-introduction"]
9+
"videos": ["ml5/0-introduction/1-introduction", "ml5/0-introduction/patt-vira"]
1010
},
1111
{
1212
"title": "Classification",

content/tracks/main-tracks/the-nature-of-code-2/index.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "The Nature of Code 2",
2+
"title": "The Nature of Code",
33
"date": "2020-02-15",
44
"playlistId": "PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM",
55
"description": "Can the unpredictable evolutionary and emergent properties of nature be captured in software? Can understanding the mathematical principles behind the physical world help to create digital worlds? This learning playlist focuses on the programming strategies and techniques behind computer simulations of natural systems. I'll explore topics ranging from basic mathematics and physics concepts to more advanced simulations of complex systems. Subjects covered include physics simulation, trigonometry, self-organization, genetic algorithms, and neural networks. This track accompanies https://natureofcode.com/",
@@ -72,6 +72,7 @@
7272
{
7373
"title": "Physics Libraries",
7474
"videos": [
75+
"challenges/184-elastic-collisions",
7576
"noc/6-physics-libraries/1-matterjs-introduction",
7677
"noc/6-physics-libraries/2-matterjs-introduction-continued",
7778
"noc/6-physics-libraries/3-matterjs-deleting-bodies",
@@ -90,7 +91,8 @@
9091
"challenges/77-recursion",
9192
"challenges/14-fractal-trees-recursive",
9293
"challenges/15-object-oriented-fractal-trees",
93-
"challenges/16-l-system-fractal-trees"
94+
"challenges/16-l-system-fractal-trees",
95+
"challenges/185-dragon-curve"
9496
]
9597
},
9698
{

content/tracks/side-tracks/livestreams/index.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"title": "Coding Train Live!",
33
"description": "This side track is a collection of select livestreams.",
44
"videos": [
5+
"livestreams/page-not-found",
56
"livestreams/creative_coding_ai_agent",
67
"livestreams/shiffbot",
78
"livestreams/decade-of-code",

content/videos/challenges/10-dfs-maze-generator/index.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"title": "Maze Generator",
33
"description": "Choo choo! In this multi-part coding challenge, I create a maze generator using a depth-first search algorithm with recursive backtracking. The idea is to walk through a grid of cells, removing walls as we go to build a maze.",
44
"videoNumber": "10",
5-
"videoId": "",
65
"date": "2016-05-02",
76
"languages": ["p5.js", "JavaScript"],
87
"topics": ["maze", "recursion", "backtracking", "depth-first search"],
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"title": "Biforkation and depth indication",
3+
"author": {
4+
"name": "Tanner Roberts"
5+
},
6+
"url": "https://editor.p5js.org/tannerbroberts/sketches/WdyY1psa9",
7+
"submittedOn": "2024-07-02T15:05:34.521Z",
8+
"socialPermission": true
9+
}
Loading
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "Amazeing",
3+
"author": {
4+
"name": "Ijee",
5+
"url": "https://github.com/Ijee",
6+
"twitter": "https://twitter.com/_Ijee",
7+
"instagram": "https://www.instagram.com/ijeex"
8+
},
9+
"url": "https://amazeing.app",
10+
"submittedOn": "2024-07-14T10:14:51.900Z",
11+
"socialPermission": true
12+
}
Loading
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"title": "pathfinding and maze generator",
3+
"author": {
4+
"name": "Bart De Meyere",
5+
"instagram": "https://www.instagram.com/bdm_80/"
6+
},
7+
"url": "https://bartdemeyere.github.io/pathfinding/",
8+
"submittedOn": "2024-07-19T16:17:24.691Z",
9+
"socialPermission": false
10+
}

content/videos/challenges/100-neuroevolution-flappy-bird/index.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"title": "Neuroevolution Flappy Bird",
33
"description": "In this challenge, I use my JavaScript neural network library and a genetic algorithm to train an agent to play Flappy Bird.",
44
"videoNumber": "100",
5-
"videoId": "c6y21FkaUqw",
65
"date": "2018-04-16",
76
"languages": ["JavaScript", "p5.js"],
87
"topics": ["neural network", "reinforcement learning", "genetic algorithms", "evolution", "Flappy Bird game"],
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"title": "Falling Object AI",
3+
"author": {
4+
"name": "Harivardhan Ramagiri",
5+
"url": "https://harivardhanr.github.io/falling-objects-ai/",
6+
"instagram": "harivardhan09"
7+
},
8+
"url": "https://github.com/HarivardhanR/falling-objects-ai",
9+
"submittedOn": "2024-07-14T08:31:02.498Z",
10+
"socialPermission": true
11+
}

0 commit comments

Comments
 (0)