Skip to content

Gatsby & TS site to showcase all my YouTube videos and book reviews

Notifications You must be signed in to change notification settings

pouretrebelle/chareads.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

81f0d32 Β· Dec 18, 2024
Sep 18, 2023
Dec 18, 2024
Feb 12, 2023
Dec 18, 2024
Dec 18, 2024
Apr 3, 2020
Feb 12, 2023
Mar 27, 2020
Feb 6, 2023
Jan 28, 2021
Feb 8, 2020
Feb 8, 2020
Feb 7, 2023
Feb 8, 2020
Feb 12, 2023
Feb 6, 2023
Feb 13, 2020
Feb 6, 2023
Feb 8, 2020
Dec 18, 2024
Dec 18, 2024
Feb 6, 2023
Dec 18, 2024

Repository files navigation

chareads.com

CI Percy.io Gitmoji

πŸ™Œ Development

  • npm install installs all the site's dependencies
  • npm start runs Gatsby in dev mode on localhost:2000

πŸ‘· Being good

  • We use Typescript for type checking, and it's hella strict
  • We use Prettier for consistent code styling, set it up for your editor with these instructions to run on file save
  • npm run lint uses ESLint with a bunch 'o plugins to check you're not writing shit syntax
  • npm run test runs Jest for all the unit tests

πŸš€ Deployment

The site is deployed to pouretrebelle.github.io/chareads.com on the gh-pages branch. This is run automatically by GitHub Actions for every commit to main, and at midnight every night.

Part of the build script runs a script to scrape the current video stats from the YouTube API, this is reliant on a YOUTUBE_API_TOKEN env var.

πŸ”¨ Scripts

  • npm run sync:videos scaffolds video content for recent YouTube videos via the API.
  • npm run sync:books scaffolds book content for recently-read books using Goodreads export data (download from here).
  • npm run sync:tbr imports data for unread Goodreads books, to add affiliate links to timestamp references

The video and book sync scripts take a count argument, for example use npm run sync:videos -- 2 to scaffold the two most recent videos.

About

Gatsby & TS site to showcase all my YouTube videos and book reviews

Topics

Resources

Stars

Watchers

Forks