This directory contains the documentation files and static site generator for nextstrain.
For general nextstrain.org
documentation including the nextstrain server (including the /charon/...
API endpoints) and auspice customizations, see nextstrain.org/README.md.
See the readme in the parent directory for instructions on how to install prerequisites and install nextstrain.org locally.
To develop just the static-site part of nextstrain.org, you may run:
npm install
npm run develop
If you wish to test the production build of just the static-site portion of nextstrain.org, you may run:
npm install
npm run build
npm run serve
If npm install
fails and you are getting an error about the Gatsby sharp
plugin dependency, it could be related to the Node support for sharp issue reported here. We have found the best results with version 10 of Node -- run node -v
to check which version you have. Please see the readme in the parent directory for our recommended way to install these dependencies. (If you're using nvm
to manage node installations, you can try running nvm install 10
).
After this, node -v
should display v10.*
.
Delete the node_modules/
folder and run npm install
again.
If that still doesn't work, delete the node_modules/
folder again and run the following commands:
npm install sharp
npm install
If npm run develop
fails and you are getting an error about pngquant
, delete the node_modules/
folder and run the following commands:
sudo apt-get install libpng-dev
npm install
- Find an image with appropriate rights for us to use.
- Edit the picture in LunaPic
- upload picture
- Style the picture via the "art" menu. Closse "grey" for core cards, "floating" for community cards or "sadness" for narrative cards. Adjust slider as you see fit.
- "Edit" -> "Simple Crop Tool" & crop to a square.
- "Edit" -> "Resize Image" to 250 x 250px
- "File" -> "Save Image" & use PNG
- Save the file in
./static/splash_images
- Edit
./src/components/Cards/coreCards.js
,./src/components/Cards/communityCards.js
or./src/components/Cards/narrativeCards.js
to include the card & title. - Edit
./src/Footer/index.jsx
to provide credit for the photo.
The static documentation is automatically rebuilt every time the (parent) repo is pushed to master.
Copyright 2014-2018 Trevor Bedford and Richard Neher.
Source code to Nextstrain is made available under the terms of the GNU Affero General Public License (AGPL). Nextstrain is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.