Skip to content

PlasmaControl/GroupWebsite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GroupWebsite

This repository contains the source code of the Plasma Control Group's website.

How it works?

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.

Updating the website

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.

Creating a pull request

To get started, follow the steps below:

  1. Ensure that you have Python version 3.12 or higher.
  2. Fork the repository and clone it with the following command.
    git clone https://github.com/YOURUSERNAME/GroupWebsite.git
    
  3. Go to the GroupWebsite directory.
    cd GroupWebsite
    
  4. Create a virtual environment.
    python -m venv .venv
    
  5. Activate the virtual environment.
    • Windows
      .venv\Scripts\activate
      
    • MacOS and Linux
      source .venv/bin/activate
      
  6. Install the requirements to the virtual environment with the following command.
    pip install -r requirements.txt
    
  7. Run the following command.
    mkdocs serve
    
  8. Then, go to http://127.0.0.1:8000 and see your changes in real time. You can now start working on the website.

Adding or editing a new page

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.

Features

To use inline $\LaTeX$ equations:

This is an inline equation $\frac{3}{4}$.

To use block $\LaTeX$ equations:

$$
\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 $\LaTeX$ commands, see here.

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.

Updating the "Members" page

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.

Updating the "Publications" page

The "Publications" page is created automatically from the publications.yaml file. All the PDFs are stored in the pdfsfolder next to the publications.yaml file.