This is the repository for the personal, academic, and professional website of Robin Lovelace (Associate Professor of Transport Data Science at the Leeds Institute for Transport Studies), hosted at robinlovelace.net.
The website is built using Quarto and is configured to deploy automatically via GitHub Pages.
This site is based on a Quarto academic template but has been heavily customized with several advanced features and automation scripts:
- Automated Publications Manager:
- Canonical Source: Publications are managed inside the BibTeX
file
references.bib. - Automation Script:
scripts/generate_publications_yml.pyparses the.bibfile (using a custom stdlib-only parser with nested brace support) and auto-generates thepublications.ymldatabase during the build pipeline. - Interactive Page: The publications page is render-optimized and supports sorting, filtering, and dynamic Academicons link integration.
- Canonical Source: Publications are managed inside the BibTeX
file
- Legacy Redirects for GitHub Pages:
- Problem: GitHub Pages does not support Netlify’s
_redirectsfile natively. - Solution:
scripts/generate_html_redirects.pyparses the Netlify-style redirects and compiles them into static HTML stubs containing<meta http-equiv="refresh" ...>tags inside the built site directory.
- Problem: GitHub Pages does not support Netlify’s
- Pre-commit File Size Guard:
- A custom pre-commit hook in
.githooks/pre-commitautomatically prevents files larger than 1 MB from being committed, keeping the repository history clean and lightweight.
- A custom pre-commit hook in
- Giscus Comments:
- Blog posts in
/posts/feature interactive comments powered by Giscus with automatic theme matching.
- Blog posts in
- Integrated Development Container:
- The repository features a pre-configured
.devcontainer/utilizing theghcr.io/geocompx/pythonrimage, providing a unified, ready-to-use R and Python environment for local rendering and development.
- The repository features a pre-configured
-
Open this workspace in VS Code.
-
Click Reopen in Container when prompted (or open the Command Palette and select
Dev Containers: Reopen in Container). -
Render and preview the site using the integrated terminal:
quarto preview
Ensure you have Quarto installed on your local machine, then run:
-
Preview the website locally:
quarto preview
-
Build/Render the static site:
quarto render
To create a new post with today’s date, load the helper function and use it:
devtools::load_all()
create_post("Your Post Title", slug = "your-post-slug")Or with tags and categories:
devtools::load_all()
create_post(
title = "Advanced Quarto Tips",
slug = "quarto-tips",
tags = c("quarto", "tips"),
categories = c("tutorial")
)The post folder and index.qmd are created automatically with today’s
date and YAML frontmatter. Run quarto preview to see it live.
To enforce the 1 MB file size limit on your local commits:
git config core.hooksPath .githooks
chmod +x .githooks/pre-commitIf you ever need to bypass this hook to commit a large file, commit with
the --no-verify flag:
git commit -m "Commit message" --no-verify