The source repository for The Collab Lab website.
Table of Contents
- ⚡️ 11ty - Static Site Generator built on top of various HTML template engines
- 💧 Liquid - Open source templating language
- 📚 Hygraph (Previously GraphCMS) - Content management
- 📡 GraphQL - Data Querying from our CMS
- 💵 Stripe - Processing payments for donations
- 🖥 Netlify - Continuous Deployment / Integration
This website requires Node and NPM to be installed in order to run locally. You can view the NPM documentation to learn more about installation.
You may also need the Netlify CLI to test certain features such as the Stripe donation buttons. If you need access to Netlify, you can request access in #committee-website and someone will invite you to the Netlify project.
Clone the website using Github CLI.
gh repo clone the-collab-lab/websiteRun npm i in the repository directory to install all the necessary packages and to set up Husky for pre-commit linting.
Use this link to access the playground and schema for our GraphQL endpoint.
Depending on your IDE, you may have the ability to introspect the schema and unlock type checking in your editor:
- Install both the GraphQL for VSCode and GraphQL: Language Feature Support plugins.
- Create a
graphql.config.jsonand copy/paste the json found below. - VSCode will automatically introspect the schema without having to create a schema file.
- Install the GraphQL Plugin.
- Create a
.graphqlconfigfile and copy/paste the json found below. - Use the GraphQL plugin to generate a
schema.graphqlfile from the config.
The JSON config for either VS Code's or IntelliJ's config file is:
{
"name": "Collab Lab GraphQL Schema",
"schemaPath": "schema.graphql",
"extensions": {
"endpoints": {
"Default GraphQL Endpoint": {
"url": "https://api-us-east-1.graphcms.com/v2/ckfwosu634r7l01xpco7z3hvq/master",
"headers": {
"user-agent": "JS GraphQL"
},
"introspect": true
}
}
}
}For other platforms, consult the documentation for your IDE.
- All of our queries and data fetching methods can be found in
pages/graphql. - The
src/_datadirectory is used to create variables and pass data to the*.liquidfiles. - The
src/assetsis where all of our JavaScript, stylesheets, image assets, fonts, and other asset files can be found. - The
src/_includeshosts the main layout file (defined insrc/pages.11tydata.json) along with any additional reusable templates. - All of the
src/*.11tydata.jsfiles are used to create variables and pass data to thesrc/*.htmlfiles, which generate the different pages on the site.
To run the site:
npm run dev # starts the dev server on port 8080To build the site:
npm run build # builds the site and outputs it in the /build/ folderTo build and run the build version of the site:
npm run build:serve # builds and serves the site in localhost:5000Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request, or create a new issue!
- Use this link to fork the repository or use the “Fork” button at the top of the repository page
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request, using your repository and branch as the source, and the
mainbranch of this repo as the base.