This repository contains the source code for The Chen Group's homepage, built with Astro and deployed via GitHub Pages.
Live Site: https://TheChenGroup.github.io
All pages are located at src/pages
. Each page is a MDX document. MDX is similar to Markdown, but can import components from src/components
directory for a more customized display.
Folder structure in src/
:
images/
members/
: Individual headshots (3:4 aspect ratio)photos/
: Group photosresearch/
: Research illustrations
pages/
index.mdx
: Home page (Web Publisher, GitHub)research.mdx
: Research and important papers (Web Publisher, GitHub)group.mdx
: Team members (Web Publisher, GitHub)publications.mdx
: List of research papers (Web Publisher, GitHub)teaching.mdx
: Courses information (Web Publisher, GitHub)photos.mdx
: Group photos (Web Publisher, GitHub)
You can click the "Web Publisher" link in Chromium-based browser to edit a single file with live preview. To edit multiple files, please use Codeflow. Alternatively, you can directly edit the files with GitHub UI by clicking the "GitHub" link.
This project uses a custom format to store publication information. The easiest way is to use GitHub workflows. Go to Add new publication workflow page, click on "Run workflow", and enter the DOI (e.g. 10.1038/s43588-024-00730-4
). A new pull request will automatically be created.
Alternatively, you can use the following command to generate it from DOI:
python scripts/doi2yaml.py 10.1038/s43588-024-00730-4
Example output:
- title: >-
Spin-symmetry-enforced solution of the many-body Schrödinger equation with a
deep neural network
doi: 10.1038/s43588-024-00730-4
authors:
- Zhe Li
- Zixiang Lu
- Ruichen Li
- Xuelan Wen
- Xiang Li
- Liwei Wang
- Ji Chen
- Weiluo Ren
journal: Nat Comput Sci
volume: "4"
page: 910-919
year: 2024
Paste the output YAML to src/pages/publications.mdx
frontmatter.
The "Research Highlights" section on the home page (src/pages/index.mdx
) showcases the most recent research highlight paper, serving a similar function to a news feature. To incorporate a new highlight, follow these steps:
- Add an image to the
images/research/
folder, using a naming convention such as2025-research-short-name.avif
. AVIF images are preferred due to their small size. - Update the existing highlight directly within
src/pages/index.mdx
with the new information. - Duplicate the details of the new research highlight in
src/pages/research.mdx
.
- Add headshot to
src/images/members/
(example filename:san.zhang.avif
) - Update
src/pages/group.mdx
:
<Member
image="members/san.zhang.avif"
name="姓名"
nameEn="English name"
year="2023"
email="[email protected]"
interest="QMC"
/>
The online approach is simpler but is not as flexible as the local version.
You can only edit one file at a time using this approach. This is best suited for small edits on the texts.
Stackblitz provides a seamless way to run Node.js programs directly in your browser. To get started, click the button below (Chrome browser is recommended):
This will launch an Online VS Code editor where you can make your changes. Follow these steps to set up and contribute:
-
Log in to GitHub: After opening the project in Stackblitz, click the GitHub icon on the sidebar to authenticate your GitHub account.
-
Install extensions: For a smoother workflow, consider installing the following extensions in the editor:
- Astro: Provides support for Astro framework features.
- MDX: Enhances editing capabilities for MDX files.
-
Make Your Changes: Modify the files as needed. After that, go to the Git sidebar to create a new branch and commit your changes. Please don't commit the
pnpm-lock.yaml
file. Remember to commit and push your changes before closing the page. -
Create a Pull Request: Open the command palette (accessible via
Ctrl/Cmd + Shift + P
) and type> create pull request
. Follow the prompts to submit your changes. -
Verify Your Pull Request: If everything is set up correctly, your pull request will appear in the GitHub UI:
-
Await Review and Approval: The pull request will be reviewed by the repository admins. Once approved, it will be merged into the main branch.
For Windows:
- Download installer from nodejs.org
- Run the installer (check "Add to PATH" during installation)
- Verify installation in Command Prompt:
node --version
# Should show v22.x or higher
For macOS:
# Using Homebrew (recommended)
brew install node
# Or download directly from nodejs.org
After Node.js installation:
# Enable corepack
corepack enable
# Verify pnpm installation
pnpm --version
# Should show 10.x or higher
# If you get "command not found", try:
# npm install -g corepack
git clone https://github.com/TheChenGroup/TheChenGroup.github.io.git
cd TheChenGroup.github.io
# For faster downloads in China
pnpm config set registry http://mirrors.cloud.tencent.com/npm/
pnpm install
# Expected successful output:
# Packages: +X
# +++ X
# Progress: resolved X, reused X, downloaded X, added X
# Done
While you can use any editors you like, VS Code has the best support for Astro and MDX editing. Simply download the "Astro" and "MDX" extension and you are ready to go.
Make sure you have configured Git. You can follow GitHub documentation or ask your favorite AI.
pnpm dev --open
What happens:
- Starts local server at
http://localhost:4321
- Automatically opens browser
- Watches for file changes (save to see updates)
Optionally, build the page and view the production version:
# Build optimized version
pnpm build
# Preview production build
pnpm preview
# Now visit http://localhost:4321
All changes should be pushed to a separate branch. Therefore, before making changes, run the following command to create and checkout to a new branch.
git checkout -b your-branch-name # Change the branch name!
After making the changes, use git add .
to add the changes and git commit -m 'your message'
to create a commit. Run the following command to upload:
git push -u origin your-branch-name # Change the branch name!
After that, navigate to GitHub web UI to create a pull request.