This repo contains the code and documentation that powers developers.sparkpost.com.
To develop with this repository, you must have the following:
- Node: version 14.16.1
- npm: version 7 recommended (version 6 is incompatible with the current lock file)
- A clone of this repo
cd developers.sparkpost.comto go into the website directory- Run
npm run bootstrapto install the npm dependencies
When developing locally, you have two options: developing the whole website or develop just the API reference section. All content will hot-reload. If you aren't seeing changes, restart the development server.
This will develop the whole developer site.
- Run
npm run develop - Open http://localhost:4000/ to view the website.
This is what you want if you are making documentation changes.
This will only develop the API reference pages and skip unnecessary queries.
- Run
npm run docs - Open http://localhost:4000/api/ to view the docs.
To develop Netlify Functions locally, run npm run lambda. This will start a second development server for the serverless functions.
Each file located in the lambda/ directory will be deployed as a serverless function.
You'll find the all the content, pages, and data inside the content folder. If you are contributing content, take a
few minutes and read through the contributing guidelines.
Create a branch for your work in the repo:
git checkout mainto checkout the main branchgit pull origin mainto get the lastest codegit checkout -b your-branch-nameto create a branch
- Follow the Local development instructions to start the development server
- Make your changes as needed
- Changes to any files in the
contentandsrcdirectories will hot-reload. - If you make changes files in the
pluginsandgatsbydirectories or any top-level files, you will need to restart the server.
- Stage and commit your changes (
git add -A && git commit -m "Describe what you did") - Push your changes (
git push origin your-branch-name) - Create a Pull Request against the
mainbranch. Netlify will publish a deploy preview so you can share and preview your changes as a live site.
- distutils package is removed in Python version 3.12
- Create a virtual environment (venv) and
pip install setuptools - or use a Python version 3.11 or earlier
- You have to install "libvps" globally on your mac system to get this plugin to work on your development machine. You need brew installed to do this.
- The "libvps" depends on gcc, so do:
brew install --build-from-source gccbrew install vips- Proceed with
npm run boostrapagain
- Install
node v.16.14.0(you can use nodenv or node-build for that) - Proceed with
npm run docsagain