next-seo
polished
framer motion
matter.js
@react-spring/core
chance
swr
babel
eslint
husky
postcss
slice-machine-ui
tailwind
@prismicio/next
This code requires Environment Varaible(s) for proper function. Please make sure you have the following environment variables set up according to the Next.js documentation (more info here):
WORKABLE_ACCESS_TOKEN=[your Workable API access token]
This app supports the latest LTS release of Node.
npm install
npm run dev
Script | Description |
---|---|
npm start |
Run app |
npm build |
Build app (run before start ) |
npm run dev |
Start dev server on localhost:3000 |
npm run lint |
Run eslint |
npm run lint-fix |
eslint auto-fix |
npm run export |
Exports a static version of the site |
npm run slicemachine |
Start Slicemachine server |
This site is built for use with the Prismic CMS and it's Slicemachine Tool.
.next
– Next.js auto-generated directory..slicemachine
– Contains the schemas for the site's Prismic Slices. These are auto-generated by Slicemachinecustomtypes
– Contains the schemas for the site's Prismic Types. These are auto-generated by Slicemachinepublic
– Public assets directory for Next.js.src
– Main website source code:core
components
– React components used throughout the Appcontext
– React context definitions, such as global statelayouts
– Page layout React components (more info here) and other reusable layout-related high-level components.sections
– Higher level React components representing Prismic Slices. Slicemachine's auto-generated registry can be found insections/index.js
lib
config
– JSON config files for defining things like routes & seo metadataconstants
– JS files containing constant value definitionshooks
– React hooks used by various componentsprismic
– Utilities for interfacing with the Prismic API Clientutils
– Simple utility functions
pages
– Next.js pages directoryapi
– Next.js severless functions
styles
– CSS configurations for site-wide styles and typography.
tailwind
– Tailwind config files and plugin definitions
This website was developed with Vercel Hosting in mind. This is because the careers page of this website relies on the Next.js API Routes feature to interface with the Workable API.
If you would like use an alternative hosting solution, that platform must support Next.js API Routes.
If configured properly with Vercel, you can deploy a new version of your site by pushing changes to the main
branch of this repository.
This part of this document details how to use ffmpeg to properly format videos for use on the site.
This site contains a section that ties scroll position to seek progress in the video. For best results and smoothest seeking, please make sure your videos are compressed using the following ffmpeg settings for low FPS, low keyframe interval, and h.264 encoding:
ffmpeg -i in.mp4 -vcodec libx264 -x264-params keyint=12:scenecut=0 -filter:v fps=12 -an out.mp4
If a higher video frame rate is desired, you can increase the fps like this:
ffmpeg -i in.mp4 -vcodec libx264 -x264-params keyint=12:scenecut=0 -filter:v fps=24 -an out.mp4
For any videos being used outside of the Scrolling Video section, use the following ffmpeg configs for best performance and cross-device support:
ffmpeg -i input -c:v libx264 -profile:v main -vf format=yuv420p -c:a aac -movflags +faststart output.mp4