Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 68 additions & 57 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Jekyll site CI

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

permissions:
contents: read
Expand All @@ -15,61 +15,72 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Block node_modules changes on pull requests
if: github.event_name == 'pull_request'
run: |
BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
CHANGED_NODE_MODULES="$(git diff --name-only "${BASE_SHA}...${HEAD_SHA}" -- 'node_modules/**')"

if [ -n "${CHANGED_NODE_MODULES}" ]; then
echo "::error title=Blocked path::Pull request includes changes under node_modules/."
echo "${CHANGED_NODE_MODULES}"
exit 1
fi

- name: Block node_modules changes on pushes
if: github.event_name == 'push'
run: |
BASE_SHA="${{ github.event.before }}"
HEAD_SHA="${{ github.sha }}"
ZERO_SHA="0000000000000000000000000000000000000000"

if [ "${BASE_SHA}" = "${ZERO_SHA}" ]; then
echo "Initial push detected; skipping node_modules diff guard."
exit 0
fi

CHANGED_NODE_MODULES="$(git diff --name-only "${BASE_SHA}...${HEAD_SHA}" -- 'node_modules/**')"

if [ -n "${CHANGED_NODE_MODULES}" ]; then
echo "::error title=Blocked path::Push includes changes under node_modules/."
echo "${CHANGED_NODE_MODULES}"
exit 1
fi

- name: Verify thesis navigation docs stay in sync
run: |
chmod +x scripts/check-phd-thesis-nav-docs.sh
./scripts/check-phd-thesis-nav-docs.sh

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Build site and search database
run: |
chmod +x scripts/build.sh
./scripts/build.sh

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Block node_modules changes on pull requests
if: github.event_name == 'pull_request'
run: |
BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
CHANGED_NODE_MODULES="$(git diff --name-only "${BASE_SHA}...${HEAD_SHA}" -- 'node_modules/**')"

if [ -n "${CHANGED_NODE_MODULES}" ]; then
echo "::error title=Blocked path::Pull request includes changes under node_modules/."
echo "${CHANGED_NODE_MODULES}"
exit 1
fi

- name: Block node_modules changes on pushes
if: github.event_name == 'push'
run: |
BASE_SHA="${{ github.event.before }}"
HEAD_SHA="${{ github.sha }}"
ZERO_SHA="0000000000000000000000000000000000000000"

if [ "${BASE_SHA}" = "${ZERO_SHA}" ]; then
echo "Initial push detected; skipping node_modules diff guard."
exit 0
fi

CHANGED_NODE_MODULES="$(git diff --name-only "${BASE_SHA}...${HEAD_SHA}" -- 'node_modules/**')"

if [ -n "${CHANGED_NODE_MODULES}" ]; then
echo "::error title=Blocked path::Push includes changes under node_modules/."
echo "${CHANGED_NODE_MODULES}"
exit 1
fi

- name: Verify thesis navigation docs stay in sync
run: |
chmod +x scripts/check-phd-thesis-nav-docs.sh
./scripts/check-phd-thesis-nav-docs.sh

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22.16.0"
cache: "npm"

- name: Lint markdown
run: |
npm ci --no-fund --no-audit --ignore-scripts
npm run lint:md

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true

- name: Build site and search database
run: |
chmod +x scripts/build.sh
./scripts/build.sh

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
# Only run deploy job on push to main, not on PRs
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/update-search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,29 @@ jobs:
run: |
GITHUB_ORG="${GITHUB_REPOSITORY%%/*}"
SEARCH_REPO="${SEARCH_REPO:-comphy-search}"
echo "Attempting to clone search database from ${GITHUB_ORG}/${SEARCH_REPO}..."
SEARCH_BRANCH="${SEARCH_BRANCH:-main}"
CLONE_URL="https://github.com/${GITHUB_ORG}/${SEARCH_REPO}.git"
CLONE_LOG="$(mktemp)"

if git clone "https://github.com/${GITHUB_ORG}/${SEARCH_REPO}.git"; then
echo "Attempting to clone search database from ${GITHUB_ORG}/${SEARCH_REPO} (${SEARCH_BRANCH})..."

if git clone --single-branch --branch "${SEARCH_BRANCH}" "${CLONE_URL}" 2>"${CLONE_LOG}"; then
mkdir -p assets/js
echo "clone_ok=true" >> "${GITHUB_OUTPUT}"
echo "Search database repository cloned successfully"
else
echo "clone_ok=false" >> "${GITHUB_OUTPUT}"
echo "Warning: Could not clone ${GITHUB_ORG}/${SEARCH_REPO}"
echo "Search functionality may be limited. This is expected if the search repository does not exist."
echo "::warning title=Search DB clone failed::Could not clone ${GITHUB_ORG}/${SEARCH_REPO}. Search update will be skipped."
CLONE_ERROR="$(tr '\n' ' ' < "${CLONE_LOG}" | sed 's/[[:space:]]\+/ /g; s/^ //; s/ $//')"
echo "::error title=Search DB clone failed::Could not clone ${GITHUB_ORG}/${SEARCH_REPO} (${SEARCH_BRANCH})."
{
echo "### Search DB update skipped"
echo "- Clone failed for \`${GITHUB_ORG}/${SEARCH_REPO}\`."
echo "### Search DB clone failed"
echo "- Repository: \`${GITHUB_ORG}/${SEARCH_REPO}\`"
echo "- Branch: \`${SEARCH_BRANCH}\`"
echo "- URL: \`${CLONE_URL}\`"
echo "- Error: \`${CLONE_ERROR}\`"
} >> "${GITHUB_STEP_SUMMARY}"
exit 0
cat "${CLONE_LOG}" >&2
exit 1
fi

- name: Copy search database
Expand Down
12 changes: 12 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env sh

set -e

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)"

if [ -z "$REPO_ROOT" ]; then
echo "Unable to determine repository root for pre-commit checks."
exit 1
fi

sh "$REPO_ROOT/scripts/check-node-modules.sh"
1 change: 1 addition & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"config": {
"default": false,
"MD034": true,
},
"ignores": ["node_modules/**", "assets/css/academicons-1.7.0/README.md"],
Expand Down
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ The following pages redirect to the CoMPhy Lab website:
- Escape literal dollar signs in content as `\$` to prevent accidental math
parsing.

### MathJax Update Checklist

- Refresh vendored MathJax at `assets/js/mathjax/tex-svg.js`.
- Update pinned fallback URL and SRI hash in `_layouts/default.html`.
- Re-run `scripts/check-phd-thesis-nav-docs.sh` and `npm run lint:md`.

### Content Management

- Team information and research papers are managed at the CoMPhy Lab
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ GEM
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
faraday (2.12.2)
faraday (2.14.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
faraday-net_http (3.4.2)
net-http (~> 0.5)
ffi (1.17.1)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-aarch64-linux-musl)
Expand Down Expand Up @@ -80,7 +80,7 @@ GEM
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
json (2.9.1)
json (2.18.1)
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
Expand All @@ -89,10 +89,10 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.5)
logger (1.7.0)
mercenary (0.4.0)
net-http (0.6.0)
uri
net-http (0.9.1)
uri (>= 0.11.1)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,40 +47,54 @@ The personal website for Vatsal Sanjay, hosted at [comphy-lab.org/vatsalsy](http
- Bundler (`gem install bundler`)

2. **Install Dependencies**

```bash
bundle install
```

3. **Run Local Server**

```bash
bundle exec jekyll serve
```

- Visit <http://localhost:4000> in the browser
- Changes in source files trigger automatic rebuilds

4. **Deployment**
- Typically managed via GitHub Pages when merged/pushed to the main branch
- Local testing is recommended before committing changes

### Commit Guardrails

- Run `./scripts/check-node-modules.sh` before commits if you touch dependencies.
- If `node_modules/` changes were accidental, clean them with:
- `git restore --staged --worktree -- node_modules`
- `git clean -fdX -- node_modules/`
- Install hooks with `npm install` so `.husky/pre-commit` blocks staged `node_modules/` changes automatically.

### Content Management

#### About Page & Content

- `about.md`: Redirects to the About section on the homepage (/#about)
- `aboutVatsal.md`: Contains the About section content loaded via JavaScript on the homepage
- The main.js file fetches and renders aboutVatsal.md in the #about-content element

**IMPORTANT**: When updating `aboutVatsal.md`, you must also update the fallback content in `about.md` (lines 15-37) to keep them synchronized. The fallback content is displayed when JavaScript is disabled.

#### Research Pages

- `research-interests.md`: Redirects to comphy-lab.org/research
- `research-interest.md`: Redirects to comphy-lab.org/research
- `phd-thesis.md`: Redirects to comphy-lab.org/research#thesis
- `talks.md`: Redirects to comphy-lab.org/research

#### Contact Page

- `contact.md`: Redirects to comphy-lab.org/join

#### Adding or Editing Team
#### Adding or Editing Team

See: [comphy-lab.org/team](https://comphy-lab.org/team) and to edit, see: [github](https://github.com/comphy-lab/comphy-lab.github.io)

Expand All @@ -91,12 +105,14 @@ See: [comphy-lab.org/research](https://comphy-lab.org/research) and to edit, see
## Part B: Back-End Documentation

### Configuration and Layouts

- `_config.yml`: Site-wide settings, collections, build options
- Layout Templates in `_layouts/`
- Partial Includes in `_includes/`
- Assets in `assets/`

### Design Elements

- **Color Scheme**
- Gradient text (Red to Blue) for lab name
- Warm orange tint + blur for header
Expand All @@ -109,23 +125,25 @@ See: [comphy-lab.org/research](https://comphy-lab.org/research) and to edit, see
- Generated from CoMPhy Lab logo

### Fonts and Icons Attribution

- [Academicons 1.7.0 (SIL OFL 1.1, MIT)](https://jpswalsh.github.io/academicons/)
- [Font Awesome](https://fontawesome.com/)
- Fontello (Various licenses)
- Libre Baskerville (SIL Open Font License)
- Open Sans (Apache License 2.0)


## Contributing Guidelines

### Issue Templates

The repository includes several issue templates to streamline the process of reporting problems or requesting changes:

1. **[Bug Report](https://github.com/VatsalSy/VatsalSy.github.io/issues/new?template=bug_report.yml)**: Use this template to report website issues, broken links, or display problems
2. **[Add Team Member](https://github.com/VatsalSy/VatsalSy.github.io/issues/new?template=add_team_member.yml)**: Template for requesting addition of new lab members with their details
3. **[Add Publication](https://github.com/VatsalSy/VatsalSy.github.io/issues/new?template=add_publication.yml)**: Template for adding new research publications with metadata

To create a new issue:

1. Click one of the template links above, or
2. Go to the Issues tab in GitHub
3. Click "New Issue"
Expand All @@ -134,14 +152,17 @@ To create a new issue:
6. Submit the issue

### Pull Request Template

When submitting changes, use the provided PR template which includes:

- Description of changes
- Type of change (bug fix, feature, content update, etc.)
- Testing checklist
- Related issues
- Screenshots (if applicable)

To submit a PR:

1. Fork the repository
2. Create a new branch for your changes
3. Make and test your changes locally
Expand Down
3 changes: 1 addition & 2 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ We’re building a computationally focused group at Durham. If you’re excited
- Sanjay, V., Zhang, B., Lv, C., & Lohse, D. The role of viscosity on drop impact forces on non-wetting surfaces. J. Fluid Mech., 1004, A6 (2025). [![Open Access](https://img.shields.io/badge/Open%20Access-Open-orange?logo=openaccess&logoColor=white&style=flat)](https://doi.org/10.1017/jfm.2024.982)

### Find me
[![Location](https://img.shields.io/badge/-Physics%20of%20Fluids-4285F4?style=flat&logo=googlemaps&logoColor=white)](https://maps.app.goo.gl/jSTCYnfcndF1uZPV8)
[![Location](https://img.shields.io/badge/-Durham%20University-4285F4?style=flat&logo=googlemaps&logoColor=white)](https://www.durham.ac.uk/staff/vatsal-sanjay/)
[![Website](https://img.shields.io/badge/-comphy--lab.org-4285F4?style=flat&logo=googlechrome&logoColor=white)](https://comphy-lab.org)
[![Email](https://img.shields.io/badge/-mailto:[email protected]?style=flat&logo=gmail&logoColor=white)](mailto:[email protected])

<div class="email-container">
<span class="email-text">[email protected]</span>
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"lint:js": "eslint assets/js/**/*.js",
"lint:css": "stylelint 'assets/css/**/*.css'",
"lint:md": "markdownlint-cli2 '**/*.md' --ignore node_modules",
"lint:md:fix": "markdownlint-cli2 --fix '**/*.md' --ignore node_modules",
"check:node-modules": "./scripts/check-node-modules.sh",
"lint": "npm run lint:js && npm run lint:css && npm run lint:md",
"format": "prettier --write assets/js/**/*.js assets/css/**/*.css",
"prepare": "husky",
Expand Down
Loading