Source code for the website of the FOCUS Lab (Florida Optics and Computational Sensor Lab) at the University of Florida ECE Department. Built with VitePress.
Caution
Every push to the master branch automatically triggers a GitHub Actions workflow that rebuilds the site and publishes it to the live production URL within a few minutes.
Do not push directly to master unless you intend to update the live site. For changes you want to test or review, push to a different branch and open a pull request, or use the StackBlitz option below.
If you only want to make small edits (text, publication entries, news items) without installing anything locally, open the project in StackBlitz:
Note
StackBlitz runs the dev server in the browser. You can edit files, see a live preview, and download or commit your changes — all without installing anything on your machine.
Choose this if you want to make larger changes or work offline.
- macOS / Linux / Windows: download the latest LTS installer from https://nodejs.org/ and run it.
- To confirm it installed correctly, open a new terminal and run:
node --version
npm --versionBoth commands should print a version number.
Clone the repository (you only need to do this once):
git clone https://github.com/uf-focus-lab/website.git focus-lab-website
cd focus-lab-websiteFrom inside the focus-lab-website/ folder, run:
npm installThis downloads all the libraries the site needs into a local node_modules/ folder. You only need to do this once, or whenever someone updates package.json.
npm run devThis starts a local server, usually at http://localhost:5173. Open that URL in your browser. Any edit you save in the src/ folder reloads the page automatically — you do not need to restart the server.
Press q in the terminal to stop the dev server.
When you are ready to generate the final static files (this is what gets deployed):
npm run buildThe output goes into .vitepress/dist/. You normally do not need to run this manually — GitHub Actions runs it automatically when you push to master. Use it to check that the build succeeds without errors before pushing.
To view the built site exactly as it will appear in production:
npm run serveThis builds the site and serves it locally. Open the URL printed in the terminal (typically http://localhost:4173).
- Create a branch for your changes (don't work directly on
master):git checkout -b your-name/short-description
- Edit files, commit, and push your branch:
git add <files you changed> git commit -m "Describe what you changed" git push -u origin your-name/short-description
- Open a pull request on GitHub for review.
- Once the PR is merged into
master, the site is rebuilt and redeployed automatically. You can watch progress under the Actions tab on GitHub.
src/index.md— homepagesrc/<section>/index.md— section pages (research, publications, team, news, etc.)src/research/<year>/<slug>/— individual research project pages with their imagessrc/public/— static assets (PDFs, images) served from the site root.vitepress/config.ts— site-wide configuration.vitepress/theme/— custom theme overrides
npm installfails: make sure you are in thewebsite/folder and have a recent Node.js version (LTS or newer). Deletenode_modules/andpackage-lock.json, then re-runnpm install.- Dev server shows a blank page or stale content: stop the server with
Ctrl+Cand runnpm run devagain. Hard-refresh the browser (Cmd+Shift+Ron macOS,Ctrl+Shift+Ron Windows/Linux). - Build fails on GitHub Actions but works locally: check the failed run under the Actions tab on GitHub for the error message, and ask the maintainer.