Skip to content

Commit 8cb8e67

Browse files
committed
Initial commit
0 parents  commit 8cb8e67

51 files changed

Lines changed: 14641 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# AI agent guide for this repo
2+
3+
This repo is an Astro 5 + MDX site with optional React "islands," Tailwind CSS v4, math rendered through KaTeX, and a small PDF→image pipeline. It renders a single-page research project site from `src/paper.mdx` using `src/pages/index.astro` as the layout and a curated set of components.
4+
5+
## Architecture and key files
6+
7+
- Astro + MDX content
8+
- Entry content: `src/paper.mdx` (MDX with YAML frontmatter). Frontmatter keys: `title`, `authors`, `conference`, `notes`, `links`, `description`, `favicon`, `thumbnail`, `theme`.
9+
- Layout: `src/pages/index.astro` imports the content and frontmatter from `src/paper.mdx`, sets `<html data-theme>`, OpenGraph tags, favicon, and uses `import.meta.env.BASE_URL` to prefix public assets for GitHub Pages.
10+
- Components (examples)
11+
- `Figure.astro` provides a consistent figure/caption pattern via named slots `figure` and `caption`.
12+
- `Picture.astro` wraps `astro:assets` with PDF support via `src/lib/render-pdf.ts`. `src` accepts either an `ImageMetadata` import or a string path ending with `.pdf` (path is resolved relative to `./src/pages/`).
13+
- `Video.astro`, `YouTubeVideo.astro`, `ModelViewer.astro` (`<model-viewer>`), `Carousel.astro`/`CarouselSlide.astro`, `Comparison.tsx` (React compare slider). React components require a `client:*` hydration directive when used inside MDX/`.astro`.
14+
- Math is rendered with `remark-math` + `rehype-katex`, so just write inline `$...$` or block `$$...$$` expressions inside MDX—no dedicated component is needed.
15+
- Styling
16+
- Tailwind v4 via `@tailwindcss/vite`; global styles in `src/styles/global.css` with a custom `dark` variant keyed off `data-theme`.
17+
- Code blocks themed with `astro-expressive-code` (see `astro.config.ts` styleOverrides and theme selector).
18+
- TypeScript & paths
19+
- TS strict config with JSX set to React; alias `@/*``./src/*` in `tsconfig.json`.
20+
21+
## Developer workflows
22+
23+
- Node.js: Local docs recommend Node 24+. CI uses Node 20 (see `.github/workflows/astro.yml`). If you adopt Node 24-only features, update the workflow accordingly.
24+
- Install & run
25+
- `npm install`
26+
- `npm run dev`http://localhost:4321
27+
- `npm run build` runs typecheck (`astro check`) then `astro build`
28+
- `npm run preview` serves the built site
29+
- Lint/format (configured but no npm scripts):
30+
- ESLint: `eslint.config.ts` covers JS/TS/TSX, Astro, JSON, Markdown, and CSS (Tailwind v4 syntax). Run with `npx eslint .`.
31+
- Prettier: `prettier.config.ts` with `prettier-plugin-astro` and `prettier-plugin-tailwindcss`. Run with `npx prettier -w .`.
32+
- Deploy
33+
- GitHub Pages is the default. Pushing to `main` builds and deploys via `.github/workflows/astro.yml`. The workflow passes `--site`/`--base`, so use `import.meta.env.BASE_URL` for public URLs (the layout in `src/pages/index.astro` already handles favicon/OG). Vercel/Netlify buttons also exist in `README.md`.
34+
35+
## Project-specific conventions
36+
37+
- Content lives in `src/paper.mdx`; import components at top and optionally map MD elements (e.g., `export const components = { table: Table }`).
38+
- Layout logic lives in `src/pages/index.astro`, which imports the content and frontmatter from `src/paper.mdx` using `import { Content, frontmatter } from "../paper.mdx"`.
39+
- Use the provided components for consistent layout:
40+
- Wrap visuals in `<Figure>` with slots: `<slot name="figure"/>` and `<slot name="caption"/>`.
41+
- Prefer `<Picture>` for images. It accepts:
42+
- imported images (Astro's `ImageMetadata`) for optimized images; or
43+
- a relative PDF path like `"../assets/plot.pdf"` to auto-render page 1 to PNG during build/dev.
44+
- `Carousel` expects `CarouselSlide` children to render each slide; place any markup inside each slide and the component handles pagination buttons, swipe, and keyboard focus states for you.
45+
- For React, import the component and add a hydration directive where used, e.g., `<Comparison client:idle>…</Comparison>`.
46+
- Theme handling
47+
- Set `theme` in frontmatter to `device | light | dark`. The layout in `src/pages/index.astro` writes `data-theme` and Tailwind's custom `dark` variant reads it. Use class `dark:*` utilities as needed; you can invert images in dark mode via `<Picture invertInDarkMode />`.
48+
- Assets & paths
49+
- Public assets in `public/` are served at the base URL; when constructing absolute URLs in the layout (`src/pages/index.astro`) or components, prefix with `import.meta.env.BASE_URL` (the layout already exposes `prefix`).
50+
- PDF conversion reads from `./src/pages/<path>` and writes to `dist/_astro/<name>.png`. In dev, `Picture.astro` points to `../dist/_astro/...`; in prod it points to `_astro/...`. Only the first page is rendered at 4× scale.
51+
52+
## Integration points and examples
53+
54+
- Icons via `astro-icon` using Iconify sets (see dependencies `@iconify-json/academicons`, `@iconify-json/ri`). Example: frontmatter `links` items include `icon: academicons:arxiv`.
55+
- Code blocks are styled by `astro-expressive-code`; don't manually theme them—follow the existing configuration in `astro.config.ts`.
56+
- To add a new interactive component:
57+
1. Create it under `src/components/` (Astro or React).
58+
1. Import it in `src/paper.mdx`.
59+
1. For React, add `client:*` (e.g., `client:idle`) at the usage site.
60+
61+
If anything here seems off or incomplete (tests aren’t defined, additional pages, alt deploys), tell me what’s missing and I’ll refine these instructions.

.github/workflows/astro.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Sample workflow for building and deploying an Astro site to GitHub Pages
2+
#
3+
# To get started with Astro see: https://docs.astro.build/en/getting-started/
4+
#
5+
name: Deploy Astro site to Pages
6+
on:
7+
# Runs on pushes targeting the default branch
8+
push:
9+
branches: ["website"]
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
env:
23+
BUILD_PATH: "." # default value when not using subfolders
24+
# BUILD_PATH: subfolder
25+
jobs:
26+
build:
27+
name: Build
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
- name: Detect package manager
33+
id: detect-package-manager
34+
run: |
35+
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
36+
echo "manager=yarn" >> $GITHUB_OUTPUT
37+
echo "command=install" >> $GITHUB_OUTPUT
38+
echo "runner=yarn" >> $GITHUB_OUTPUT
39+
echo "lockfile=yarn.lock" >> $GITHUB_OUTPUT
40+
exit 0
41+
elif [ -f "${{ github.workspace }}/package.json" ]; then
42+
echo "manager=npm" >> $GITHUB_OUTPUT
43+
echo "command=ci" >> $GITHUB_OUTPUT
44+
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
45+
echo "lockfile=package-lock.json" >> $GITHUB_OUTPUT
46+
exit 0
47+
else
48+
echo "Unable to determine package manager"
49+
exit 1
50+
fi
51+
- name: Setup Node
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: "20"
55+
cache: ${{ steps.detect-package-manager.outputs.manager }}
56+
cache-dependency-path: ${{ env.BUILD_PATH }}/${{ steps.detect-package-manager.outputs.lockfile }}
57+
- name: Setup Pages
58+
id: pages
59+
uses: actions/configure-pages@v5
60+
- name: Install dependencies
61+
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
62+
working-directory: ${{ env.BUILD_PATH }}
63+
- name: Build with Astro
64+
run: |
65+
${{ steps.detect-package-manager.outputs.runner }} astro build \
66+
--site "${{ steps.pages.outputs.origin }}" \
67+
--base "${{ steps.pages.outputs.base_path }}"
68+
working-directory: ${{ env.BUILD_PATH }}
69+
- name: Upload artifact
70+
uses: actions/upload-pages-artifact@v3
71+
with:
72+
path: ${{ env.BUILD_PATH }}/dist
73+
deploy:
74+
environment:
75+
name: github-pages
76+
url: ${{ steps.deployment.outputs.page_url }}
77+
needs: build
78+
runs-on: ubuntu-latest
79+
name: Deploy
80+
steps:
81+
- name: Deploy to GitHub Pages
82+
id: deployment
83+
uses: actions/deploy-pages@v4

.github/workflows/pre-commit.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: pre-commit
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- '*'
7+
- '*/*'
8+
- '**'
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v3
15+
- uses: pre-commit/action@v3.0.0

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
### VisualStudioCode ###
2+
.vscode/*
3+
!.vscode/settings.json
4+
!.vscode/tasks.json
5+
!.vscode/launch.json
6+
!.vscode/extensions.json
7+
!.vscode/*.code-snippets
8+
9+
# Local History for Visual Studio Code
10+
.history/
11+
12+
# Built Visual Studio Code Extensions
13+
*.vsix
14+
15+
### VisualStudioCode Patch ###
16+
# Ignore all local history of files
17+
.history
18+
.ionide
19+
20+
# build output
21+
dist/
22+
23+
# generated types
24+
.astro/
25+
26+
# dependencies
27+
node_modules/
28+
29+
# logs
30+
npm-debug.log*
31+
yarn-debug.log*
32+
yarn-error.log*
33+
pnpm-debug.log*
34+
35+
# environment variables
36+
.env
37+
.env.production
38+
39+
# macOS-specific files
40+
.DS_Store
41+
42+
# jetbrains setting folder
43+
.idea/

.pre-commit-config.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
# See https://pre-commit.com for more information
3+
# See https://pre-commit.com/hooks.html for more hooks
4+
5+
# Don't run pre-commit on files under any thirdparty/, third_party/, third-party/, etc. sub-folders
6+
# But will run on directories like third/.../../party/, etc.
7+
exclude: (?i)^(.*third[^/]*party/.*|.*\.trt)$
8+
9+
repos:
10+
- repo: https://github.com/sirosen/check-jsonschema # check-jsonschema is a github actions and workflows verifier.
11+
rev: 0.37.1
12+
hooks:
13+
- id: check-github-actions
14+
- id: check-github-workflows
15+
16+
- repo: https://github.com/pre-commit/mirrors-prettier
17+
rev: v4.0.0-alpha.8
18+
hooks:
19+
- id: prettier
20+
types_or: [css, scss, json, javascript, html]
21+
exclude: (?i)(.*main.*scss)$
22+
23+
- repo: https://github.com/google/yamlfmt
24+
rev: v0.21.0
25+
hooks:
26+
- id: yamlfmt
27+
exclude: (?i)(.pre-commit-config.yaml)$
28+
29+
- repo: https://github.com/jonasbb/pre-commit-latex-hooks
30+
rev: v1.5.0
31+
hooks:
32+
- id: american-eg-ie
33+
- id: cleveref-capitalization
34+
- id: consistent-spelling
35+
args:
36+
[
37+
"--emph=et al.",
38+
"--emph=a priori",
39+
"--emph=a posteriori",
40+
'--regex=naive=\bna(i|\\"i)ve',
41+
]
42+
- id: csquotes
43+
- id: ensure-labels-for-sections
44+
args:
45+
[
46+
# If present only check that there is a \label{} but not the value
47+
"--ignore-label-content",
48+
]
49+
- id: no-space-in-cite
50+
- id: tilde-cite
51+
- id: unique-labels
52+
# args:
53+
# [
54+
# # If present only check for uniqueness within each file.
55+
# # Can be useful if a repository contains multiple main files.
56+
# "--individual",
57+
# ]
58+
- id: cleveref-instead-of-autoref
59+
60+
- repo: https://github.com/cmhughes/latexindent.pl.git
61+
rev: V4.0
62+
hooks:
63+
- id: latexindent
64+
65+
- repo: https://github.com/executablebooks/mdformat # mdformat is a markdown formatter.
66+
rev: 1.0.0
67+
hooks:
68+
- id: mdformat
69+
70+
- repo: https://github.com/pre-commit/pre-commit-hooks # pre-commit-hooks is a collection of additional pre-commit hooks.
71+
rev: v6.0.0
72+
hooks:
73+
# - id: requirements-txt-fixer # fixes requirements.txt and requirements-dev.txt.
74+
# - id: check-added-large-files # prevents giant files from being committed.
75+
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystem.
76+
- id: check-merge-conflict # checks for files that contain merge conflict strings.
77+
- id: check-yaml # checks yaml files for parseable syntax.
78+
args:
79+
- --allow-multiple-documents
80+
- --unsafe
81+
# - id: check-executables-have-shebangs # ensures that (non-binary) executables have a shebang.
82+
# - id: check-shebang-scripts-are-executable # ensures that (non-binary) files with a shebang are executable.
83+
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
84+
- id: fix-byte-order-marker # removes utf-8 byte order marker.
85+
- id: mixed-line-ending # replaces or checks mixed line ending.
86+
- id: trailing-whitespace # trims trailing whitespace.

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# As of 2025-10-18, Prettier only supports MDX v1.0.
2+
# See https://github.com/prettier/prettier/issues/12209 for updates.
3+
*.mdx

README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Academic project page template
2+
3+
This is a template to help you build a professional project page for your research paper, based on the design from the original [Nerfies page](https://nerfies.github.io/). Instead of manually editing an HTML file, you can author the page's content in Markdown and make use of a polished set of components, then deploy it with GitHub Pages. [See a live demo of the template](https://research-template.roman.technology).
4+
5+
<img src="public/screenshot-light.png" width="48%" alt="Screenshot of this template in light mode" /> <img src = "public/screenshot-dark.png" width="48%" alt="Screenshot of this template in dark mode"/>
6+
7+
## Features
8+
9+
- Pre-built components for LaTeX, figures, tables, code blocks (with syntax highlighting), videos, YouTube embeds, 3D objects, comparison sliders, carousels, tabbed slides, and pairs of columns.
10+
- Optional dark mode :)
11+
- Automatically converts figures stored as PDF files into images.
12+
- Compresses images using [AVIF](https://en.wikipedia.org/wiki/AVIF) and uses [responsive images](https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Responsive_images) to minimize loading time.
13+
- Optimized font rendering, with [resized fallback font faces](https://developer.chrome.com/blog/font-fallbacks) to prevent cumulative layout shift.
14+
- Responsive, accessible, and SEO-optimized.
15+
- Add your own components with HTML or any Javascript framework you like. React comes pre-configured, but you could also use Vue, Svelte, etc.
16+
- Built with [Astro](https://astro.build/), [React](https://react.dev/), [Tailwind](https://tailwindcss.com/), [MDX](https://mdxjs.com/), and [TypeScript](https://www.typescriptlang.org/).
17+
18+
## Examples
19+
20+
- [Token-Efficient Long Video Understanding for Multimodal LLMs](https://research.nvidia.com/labs/lpr/storm/) (NVIDIA Research)
21+
- [PolyPose: Deformable 2D/3D Registration via Polyrigid Transforms](https://polypose.csail.mit.edu/) (MIT CSAIL)
22+
- [ByteWrist: A Parallel Robotic Wrist Enabling Flexible and Anthropomorphic Motion for Confined Spaces](https://bytewrist.github.io/) (ByteDance Seed)
23+
- [Dexterous Teleoperation of 20-DoF ByteDexter Hand via Human Motion Retargeting](https://byte-dexter.github.io/) (ByteDance Seed)
24+
- [Conformal Prediction as Bayesian Quadrature](https://jakesnell.com/projects/conformal-as-bayes-quad/)
25+
- [Lossy Compression With Pretrained Diffusion Models](https://jeremyiv.github.io/diffc-project-page/)
26+
- [RoboSpatial: Teaching Spatial Understanding to 2D and 3D Vision-Language Models for Robotics](https://chanh.ee/RoboSpatial/)
27+
- [CLIP-RT: Learning Language-Conditioned Robotic Policies from Natural Language Supervision](https://clip-rt.github.io/)
28+
- [PCO: Precision-Controllable Offset Surfaces with Sharp Features](https://alan-leo-wong.github.io/SIGASIA24-PCO-ProjectPage/)
29+
- [SCUBA: Salesforce Computer Use Benchmark](https://sfrcua.github.io/SCUBA/)
30+
31+
## Usage
32+
33+
1. Click ["Use this template"](https://github.com/new?template_name=academic-project-astro-template&template_owner=RomanHauksson) to make a copy of this repository in your GitHub account.
34+
1. Enable GitHub Pages for the repository. Click on the **Settings** tab, then go to **Pages** (under the **Code and automation** section). Using the dropdown, change **Source** from "Deploy from a branch" to "GitHub Actions".
35+
36+
At this point, whenever you push to the `main` branch, the GitHub Actions workflow in `.github/workflows/astro.yml` will automatically build a static website and deploy it to `https://<username>.github.io/<repository>/`. No other configuration is necessary!
37+
38+
To edit the content, you _could_ simply edit [`./src/paper.mdx`](./src/paper.mdx) in your browser in the GitHub interface, without downloading or setting anything else up. But if you want to preview your changes faster, I recommend editing it locally:
39+
40+
3. Clone the repository.
41+
42+
1. [Install Node.js](https://nodejs.org/en/download/) if you haven't already. Make sure you're using version 24 or later, which you can check by running
43+
44+
```bash
45+
node --version
46+
```
47+
48+
If your Node version is less than 24, you can use [Node Version Manager](https://github.com/nvm-sh/nvm) to install version 24 and switch to it:
49+
50+
```bash
51+
nvm install 24 && nvm use 24
52+
```
53+
54+
6. In the root directory of your cloned repository, install the dependencies:
55+
56+
```bash
57+
npm install
58+
```
59+
60+
7. Start the development server:
61+
62+
```bash
63+
npm run dev
64+
```
65+
66+
While the development server is running, you can open `http://localhost:4321` in your browser to see a live preview of your page.
67+
68+
8. Edit the content in [`./src/paper.mdx`](./src/paper.mdx). Every time you save a file, the development server will automatically reload `http://localhost:4321` to display the updated version of the page.
69+
70+
1. Push your changes to the GitHub repository to trigger a new deployment with your changes.
71+
72+
Alternatively, you can build the site locally, and copy the output to wherever you'd like to host the site. Running the following command will create a static website stored in `./dist/`.
73+
74+
```bash
75+
npm run build
76+
```
77+
78+
For more information, consult [`./documentation.md`](./documentation.md).
79+
80+
I'd like to speak directly with users to learn about what they want and get feedback on the template. If you're interested in getting help with setting up with the project, fixing bugs AI can't solve, or even having me develop the page for you, you can [email me](mailto:roman.i0djm@aleeas.com) or [schedule a virtual meeting](https://cal.com/romanhauksson/projectpage).
81+
82+
## Alternative template
83+
84+
For a different look, the other template I'd recommend is [_Clarity: A Minimalist Website Template for AI Research_](https://shikun.io/projects/clarity) by Shikun Liu. It has a beautiful and careful design that's distinct from the original Nerfies page. It's simply an HTML file styled with Sass.
85+
86+
## Credits
87+
88+
This template was originally adapted from Eliahu Horwitz's [Academic Project Page Template](https://github.com/eliahuhorwitz/Academic-project-page-template), which was adapted from Keunhong Park's [project page for _Nerfies_](https://nerfies.github.io/). It's licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).

0 commit comments

Comments
 (0)