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
The following steps will set up your local computer in order to submit a contribution of code or content to PlasmaPy's website.
-
Create a fork of the PlasmaPy/plasmapy.github.io repository on GitHub.
-
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.
-
Add a remote to connect to the upstream repository.
git remote add upstream https://github.com/PlasmaPy/plasmapy.github.io.git
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
.
-
Fetch the most recent updates to the repository.
git fetch --all
-
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
-
Make and commit changes in the
web/
directory. Most of the pages are inweb/pages/
while blog posts are inweb/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. -
Inside the
web/
directory, build and preview the website usingnikola auto --browser
-
Create a pull request to the
src
branch on the main repository. -
The website will be rebuilt automatically after the pull request is merged. After five to ten minutes, check that the website is functioning nominally.
The quickest way to contact PlasmaPy developers is through the Matrix/Gitter channel.