The neontribe MVP with static HTML, CSS, and JS.
-
Prerequisites
- git
- nvm
A standalon version of Yarn is bundled with the project.
-
Get up and running
Navigate into your new site’s directory and start it up.
git clone [email protected]:neontribe/www.git cd www nvm use yarn yarn develop
⚠️ git clone
might not work if you are not the owner of the directory where you want to clone this repository. The following error might be thrown:Permission denied (publickey). fatal: Could not read from remote repository.
If that happens, change ownership of that directorysudo chown <username>: <path-to-directory> -R
. -
Open the source code and start editing!
Your site is now running at
http://localhost:8000
!Note: You'll also see a second link:
http://localhost:8000/___graphql
. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.Save your changes and the browser will update in real time!
Please use yarn
to manage the dependencies and scripts in this project. You shouldn't have to worry about which version you have, so long as it is better than 1.0.1. This system will take care of the details.
-
Keeping your local copy up to date
It's a good idea check that your node version and dependencies are in sync. When you pull from a branch, we suggest running these commands to be sure:
nvm use yarn
As of December 2021 the
main
branch was renamed frommaster
. If you have a local copy of the site installed before this date you will need to update your local clone of the project.From the local clone of the repository on a computer, run the following commands to update the name of the default branch.
git branch -m OLD-BRANCH-NAME NEW-BRANCH-NAME git fetch origin git branch -u origin/NEW-BRANCH-NAME NEW-BRANCH-NAME git remote set-head origin -a
-
Adding dependencies
The best way to add a new dependency is via
yarn
as follows:yarn add --exact some-cool-package
If the package is part of the test or build tools for this project please be sure to add
--dev
.*why
--exact
? To avoid problems with dependencies updating unexpectedly because of semver masking we want to "pin" them to a specific version number. This will also help our robots when they want to tell us about updates. -
Maintaining dependencies
If you want to check for and update to new versions of our dependencies manually, the easiest way to do so is by running:
yarn upgrade-interactive --latest
This will give you a nice menu of updates to choose from and will maintain
package.json
andyarn.lock
automatically. -
Updating Yarn
A standalone version of Yarn is included in ./.yarn/. This is to make sure everyone making changes to the site is using the same version, regardless of what they may have installed. To update this:
- Download a new version from Yarn's releases page
- Replace the existing version in ./.yarn/
- Update the yarn-path in ./.yarnrc
- Update the version in engines.yarn in package.json
The website is deployed using now.sh
. The production website reflects the main
branch. Pull requests which are made against main are considered staging branches.
- When contributing to the project you need to follow our development process. Please go and read these instructions ./CONTRIBUTING.md.
- Beware, the website uses continuous deployments. When you merge into main the change will shortly be available on the production site.
Please read the ./now.json configuration if you need more infrastructure specific information. The documentation for the content of the configuration file is on the zeit website.
To add yourself or another colleague to the tribers
, you need to:
- navigate to
src/data/tribers
- create a markdown file titled
first-name.md
-> e.g. in the command line you can dotouch jane.md
- add content and here is an example markdown file with all of the features you can have in it, exhaustively:
---
name: 'Jane Doe'
words:
- Words
- Go
- Here
image: images/jane.jpg
story: stories/jane.md
social:
twitter: 'janedoe'
github: 'doej'
linkedin: 'jane-doe' # this must be the bit after `in/` for your public linkedin profile URL
instagram: 'janeyd'
twitch: 'jdoegaming'
facebook: 'jane.doe'
youtube: 'janedoe'
---
Your bio goes here
🚨 You must follow the format included above and don't add more than five social links because they won't all fit.
- add a photo of you in the
src/data/tribers/images
directory.
🚩 Make sure that the name will match the one inserted next to the image field in the markdown file (see previous step).
- commit your changes and make a pull request
Don't like your bio? Want to change your words? Or maybe just add/remove your social media link(s)? You can change all of these in the src/data/tribers
directory.
-
find the related markdown file and edit it as needed and/or replace the image in the
src/data/tribers/images
directory -
commit your changes and make a pull request