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 Zotero. Join our group in Zotero with https://www.zotero.org/groups/6251966/geee, and add drag your paper (usually from "My Publications" collection in your own library) into the "Publications" collection in the group library.
The changes will automatically be picked up by GitHub once a day. If you are impatient, go to the workflow page and click on "Run workflow". A new pull request will automatically be created.
Manual modifications to src/pages/publications.mdx frontmatter is discouraged.
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.mdxwith 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.yamlfile. 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 higherFor macOS:
# Using Homebrew (recommended)
brew install node
# Or download directly from nodejs.orgAfter 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 corepackgit 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
# DoneWhile 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 --openWhat 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:4321All 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.

