This repository contains the source code of the Plasma Control Group's website.
It uses MkDocs with the MkDocs-Material theme. MkDocs is a Python package. It takes the website's content (src
) and returns it as HTML, CSS, and JavaScript files, which are then deployed to Princeton University's servers.
Whenever something is pushed to the main
branch, the website is rebuilt (i.e., HTML, CSS, and JavaScript files are generated using MkDocs) and deployed to Princeton Univerisity's servers with the workflow recipe defined in .github/workflows/deploy.yaml
.
The content is written with Markdown syntax, and on top of that, it supports various features such as
- References with BibteX
- Auto-numbered
$\LaTeX$ equations - Diagrams written with Mermaid
- Cross-referencing
- Figures with captions
- Many more.
Therefore, updating the content of the website is very easy.
There are two ways of updating the website:
- Creating a pull request
- Using the backend app. It is only for updating the "Members" and "Publications" pages.
To get started, follow the steps below:
- Ensure that you have Python version 3.12 or higher.
- Fork the repository and clone it with the following command.
git clone https://github.com/YOURUSERNAME/GroupWebsite.git
- Go to the
GroupWebsite
directory.cd GroupWebsite
- Create a virtual environment.
python -m venv .venv
- Activate the virtual environment.
- Windows
.venv\Scripts\activate
- MacOS and Linux
source .venv/bin/activate
- Windows
- Install the requirements to the virtual environment with the following command.
pip install -r requirements.txt
- Run the following command.
mkdocs serve
- Then, go to http://127.0.0.1:8000 and see your changes in real time. You can now start working on the website.
All the files with md
extensions are the pages. Create new ones or edit the existing ones. To add a new page to the navigation, see the mkdocs.yaml
file.
To use inline
This is an inline equation $\frac{3}{4}$.
To use block
$$
\int_1^2 x^2 dx=\frac{x^3}{3}\Big|_{x=1}^{x=2}
$$
To auto-number the equations:
$$
\begin{equation}
\int_1^2 x^2 dx=\frac{x^3}{3}\Big|_{x=1}^{x=2}
\end{equation}
$$
To cross-reference the equations:
See [Equation 1](#eq:my_label).
$$
\begin{equation}
\int_1^2 x^2 dx=\frac{x^3}{3}\Big|_{x=1}^{x=2}
\end{equation}
$$
{ #eq:my_label }
To see all the available
To add a figure without a caption:
![](assets/images/group_photo.jpg){ #group-photo }
To add a figure with a caption:
![This is the caption.](assets/images/group_photo.jpg)
To cross-reference the figures:
See [](#fig:my_label).
![This is the caption.](assets/images/group_photo.jpg){ #fig:my_label }
To use Mermaid diagrams:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
To cite a reference:
See [@my_reference].
and add the reference to the references.bib
file.
The "Members" page is created automatically from the members.yaml
file. CVs and photos are stored in the cvs
and photos
folders next to the members.yaml
file.
The "Publications" page is created automatically from the publications.yaml
file. All the PDFs are stored in the pdfs
folder next to the publications.yaml
file.