This is the Computational Light Laboratory website, built with ** MkDocs** using the Material for MkDocs theme. The site documents research, publications teaching materials and technical documentation for UCL's Computational Light Lab.
- Framework: MkDocs with Material theme (
mkdocs-material) - Plugins:
mkdocs-glightbox,mkdocs-bibtex,mkdocs-redirectsmkdocstrings,autorefs - Content Format: Markdown with MathJax support LaTeX equations, HTML/CSS for custom components
- Deployment: GitHub Actions to GitHub Pages
# Install dependencies (if needed)
pip install mkdocs-material mkdocs-glightbox mkdocs-bibtex mkdocs-redirects mkdocstrings
# Start development server with hot-reload
mkdocs serve
# Build production site
mkdocs build
# Deploy to GitHub Pages (requires write access)
mkdocs gh-deploy --force# Check MkDocs configuration validity
mkdocs build --strict
# Verify syntax of JavaScript files
node --check docs/javascripts/slideshow.js
node --check docs/javascripts/config.js- Use Multi-Tabbed Lists and
???+ Questionfor collapsible content sections - Wrap complex HTML elements in
<body>or container divs for proper rendering - All image paths must be relative to the
docs/directory - Use
class="off-glb"on images that should skip lightbox processing - Center images with
text-align: center;wrapper orp.aligncenter
- Internal links:
'page-path/index.md'or'page-path/'in mkdocs.yml nav - External links: Full URL starting with
http://orhttps:// - In markdown body:
[link text](relative/path/)for internal URLs
- Inline math:
\(...\)renders via MathJax - Display math:
\[...`]`` in arithmatex enabled blocks - No special wrapper needed for standard inline equations
- Use
function declarefor global functions and arrow functions inside closures - Variable naming: camelCase (e.g.,
currentSlide,numSlidesslidesContainer`) - Event listeners use descriptive handler names:
handleNext(), handlePrevious()` - No semicolons at end of statements if following project convention (inconsistent)
- Use
constfor immutable references,letfor counters and state
// Preferred: querySelector with data attributes
const element = carousel.querySelector('[data-carousel-slides-container]');
// Iterate NodeList with forEach
carousels.forEach(setUpCarousel);- Vanilla JavaScript only no frameworks or libraries beyond browser APIs
- Avoid
document$.subscribe()except in MathJax integration (config.js)
- Use CSS variables for theming:
--md-primary-fg-color,--current-slide - Dark/light theme support via
[data-md-color-scheme="scheme-name"]selectors - Primary theme color:
#a61600(YouTube red variant)
- Prefix component classes:
.carousel-*,.md-grid, slide*` - Use BEM-like structure when extending components
- Media queries at bottom of file, mobile-first not enforced
- Max width for full layout:
.md-grid { max-width: 1440px; } - Carousel height constrained to
550px max-height
- Use hierarchical lists with page titles as keys
- Nested under section headers (Home, People, Timeline, Publications, etc.)
- Redirects must use original path: new path format in plugins section
- Keep plugin options indented correctly under their key
- BibTeX file path relative to docs/:
"docs/references.bib" - JavaScript files listed in
extra_javascriptshould be absolute or CDN URLs
# Typical commit flow on main repository (complight.github.io)
git checkout master # or main, both trigger CI
# Make changes...
git add .
git commit -m "Descriptive message about change"
git push origin master # Triggers GitHub Actions deploy- Publication pages in
docs/publications/: Link images frompublications/media/subdirectory, include title, venue and thumbnail - People pages: Markdown tables organized by role (PI, PhD Students, Master's Students, etc.)
- Technical docs in
docs/documentation/computing/: Ubuntu-specific commands and lab infrastructure guides - Timeline entries: Year-based markdown with links to detailed event pages
docs/
├── documentation/ # Lab procedures setup guides
├── javascripts/ # Custom interactive components
├── logo/ # Brand assets (logo.png, favicon)
├── media/ # Global images
├── outreach/ # Community information
├── people/ # Team listings bios
├── publications/ # Research works with media subdirectory
├── stylesheets/ # Theme overrides custom styles
├── teaching/ # Course materials lecture notes
└── timeline/ # News announcements events
mkdocs.ymlplugins section (breaks site if config invalid).github/workflows/ci.ymldeployment pipelinedocs/javascripts/slideshow.jscarousel depends on CSS variables incarousel.css- MathJax configuration in
config.jsaffects LaTeX rendering globally
- Citations stored in
docs/references.bib - MkDocs-BibTeX plugin auto-generates bibliographies from this file
- New entries must follow standard BibTeX/LaTeX format
When adding new content:
- Create matching markdown file and add to nav in
mkdocs.yml - Test locally with
mkdocs serve --strict - Commit with descriptive message that will appear as PR title if using GitHub flow
- Deployment is automatic on push to master/main