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

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