The lab website is built using this template.
- Template
- File Structure
- Maintenance
- Domain Management
- Tips and Troubleshooting
- Additional Resources
- TODO
.
├── CNAME # Contains the custom domain name
├── README.md # Documentation for the repository
├── assets/
│ ├── CU_logo_bg-dark.png # Columbia University logo (footer)
│ ├── bios # Folder containing md files
│ │ ├── about.md # About the lab
│ │ └── [lab member bios]
│ ├── banner.jpg # The main banner image
│ ├── css
│ │ └── my-styles.css # Custom styles (add or override)
│ ├── favicon.png # Custom web icon
│ ├── js
│ │ ├── injectMarkdown.js # Script for rendering Markdown content
│ │ ├── people.js # Script for rendering lab members
│ │ └── publications.js # Script for fetching publications
│ └── photos/
│ └── [lab member photos]
├── index.html # Main HTML file
├── prettier.sh # Script to automatically format files
└── people.json # Text file containing lab member dataYou should not need to modify the HTML or CSS files directly. The website is designed to be easy to update without needing to know HTML or CSS. Most content is stored in Markdown files and JSON, which are human-readable
The website uses JavaScript to dynamically generate content:
injectMarkdown.js: Injects content from Markdown files into named sectionspeople.js: Fetches and renders the lab members frompeople.jsonpublications.js: Fetches and renders recent publications from PubMed
Content for the "About" section and lab member bios is stored in Markdown files.
These files are located in the assets/bios/ directory. For more information on
markdown syntax, refer to the Markdown Guide
and the GitHub Markdown Guide.
You don't need to manually update the "Recent Publications" section. The website automatically fetches the latest publications from PubMed using the PubMed API.
To update lab members, edit the people.json file. This is a JSON document
(JavaScript Object Notation) that structures data in a human-readable format.
Structure of people.json:
- The file contains objects for different categories (e.g., "Postdoctoral Fellows", "Students")
- Each category is an array of person objects
- Each person object has properties like "name", "photo", "description", and optionally "website"
To add, remove, or modify lab members:
- Navigate to
people.jsonin the GitHub repository - Click the edit (pencil) icon
- Make your changes, following the existing structure
- Commit your changes with a descriptive message
Example of adding a new lab member:
"Research Staff": [
{
"name": "New Member, Ph.D.",
"photo": "assets/photos/NewMember.jpg",
"description": "Dr. New Member is a researcher working on XYZ in the Palomero Lab",
"website": "https://example.com"
},
// ... existing members ...
]To add new lab member photos:
- Go to the
assets/photos/directory in the GitHub repository - Click "Add file" > "Upload files"
- Select and upload the new photo(s)
- Commit the changes
- Update the corresponding entry in
people.jsonwith the correct file path
The website domain (palomerolab.org) is registered through Porkbun. The website is hosted for free on GitHub Pages, with only the domain name requiring annual renewal.
For detailed instructions on setting up custom domains with GitHub Pages, including A records configuration, refer to the GitHub Pages documentation.
The CNAME file in the repository root contains just the domain name
(palomerolab.org). The file is used to map the custom domain to the GitHub Pages
site.
Other repositories with GitHub Pages enabled are accessible under palomerolab.org.
For example, a repository named project would be accessible at palomerolab.org/project.
- Use the GitHub web interface for simple text edits to minimize the risk of errors
If you encounter issues:
- Check that all JSON in
people.jsonis valid (no missing commas, brackets, etc.) - Ensure all file paths in
people.jsonare correct - Verify that new photos are in the correct directory and format
- If dynamic content isn't loading, check the browser console for JavaScript errors
For more complex issues or if you're unsure about making changes, create an issue in the repository or ask for help.
- Automatically format changes with
prettier - Implement a GitHub Action to validate JSON syntax on every commit
- Prevent accidental deletion of
people.jsonorassets/photos/ - Create a web-based form for editing
people.jsonto avoid syntax errors - Add a script to automatically resize and optimize uploaded photos
- Implement a staging environment for testing changes before they go live
- Add a script to automatically update copyright year in the footer