Skip to content

Latest commit

 

History

History
91 lines (62 loc) · 3.38 KB

CONTRIBUTING.md

File metadata and controls

91 lines (62 loc) · 3.38 KB

Contributing to PlasmaPy's website

Prerequisites

PlasmaPy's website is built using the Nikola static website generator. In order to build the website locally on your computer, you will need to install Nikola. This may be done for your local Python installation using pip.

pip install nikola

Resources

Getting started

The following steps will set up your local computer in order to submit a contribution of code or content to PlasmaPy's website.

  1. Create a fork of the PlasmaPy/plasmapy.github.io repository on GitHub.

  2. Clone your fork using git, and enter the directory.

    git clone https://github.com/username/plasmapy.github.io.git
    cd plasmapy.github.io

where username is your GitHub username.

  1. Add a remote to connect to the upstream repository.

    git remote add upstream https://github.com/PlasmaPy/plasmapy.github.io.git

A note on branches

Nikola's source files are located on the src git branch, and the built HTML files are located on the main branch. The GitHub repository defaults to the source branch as default when cloning the repository, so you shouldn't need to worry about this - and you definitely do not need to change files on main.

Submitting a code contribution

  1. Fetch the most recent updates to the repository.

    git fetch --all
  2. Create and check out a branch based off of the src branch of the upstream repository, and connect it to a new branch in your fork on GitHub.

    git checkout -b new-branch-name upstream/src
    git push --set-upstream origin new-branch-name
  3. Make and commit changes in the web/ directory. Most of the pages are in web/pages/ while blog posts are in web/posts/.

    git add changed_file.md
    git commit -m "Updated changed_file.md"

    Pages and posts are predominantly written in markdown, but nikola supports various file formats like HTML, reStructuredText, etc. Please use the markdown format, unless it's absolutely necessary to use one of the others.

  4. Inside the web/ directory, build and preview the website using

    nikola auto --browser
    
  5. Create a pull request to the src branch on the main repository.

  6. The website will be rebuilt automatically after the pull request is merged. After five to ten minutes, check that the website is functioning nominally.

Getting help

The quickest way to contact PlasmaPy developers is through the Matrix/Gitter channel.