This is the source code of my website. I plan to store notes on how to use it here.
New talk:
hugo new --kind event event/ogh23
cp -Rv content/event/glasgow2024 content/event/st-andrews2025
code content/event/st-andrews2025/index.md# Equivalent copying code in R:
system("cp -Rv content/event/glasgow2024 content/event/st-andrews-2025")
file.copy("content/event/st-andrews-2025/index.qmd", "content/event/st-andrews-2025/index.Rmd", overwrite = TRUE)
#> [1] TRUEremotes::install_cran("blogdown")
file.edit("content/event/modeshift-2022/index.md")
blogdown::install_hugo()
# new blog post:
blogdown::new_post(title = "2024-retrospective", ext = ".Rmd")
blogdown::new_content(path = "software/index.Rmd")
# serve site
blogdown::serve_site()
blogdown::stop_server()
# build site
blogdown::build_site()To update publications:
pip install --upgrade academic
# 1. Update the BibTeX file with new entries (from Zotero or manually)
academic import --overwrite --normalize --bibtex static/bibs/my-citations-for-web.bib content/publication/academic import --overwrite:
-
Abstracts are cleared — the import sets
abstract: ''for all pages. Restore from Git:# Restore publication pages from before the import (commit first so you can diff) git diff HEAD -- content/publication/ > /tmp/import-changes.diff git checkout HEAD~1 -- content/publication/ # Then re-run import with --bibtex and selectively merge changes
-
publication_typesmust be integers — import may output strings like"article-journal". Wowchemy requires:0= uncategorized,2= journal article,5= book. Fix:find content/publication/ -name "index.md" -exec sed -i.bak 's/- article-journal$/- "2"/' {} \; && find content/publication/ -name "*.bak" -delete
-
Featured publications reset —
--overwritesetsfeatured: falseon all pages. Re-enable:# Set featured: true in index.md for key publications -
Template placeholders — import leaves
Add the **full text**...placeholder text. Remove:find content/publication/ -name "index.md" -exec sed -i.bak '/Add the \*\*full text\*\*/d' {} \; && find content/publication/ -name "*.bak" -delete
Adding new papers from Zotero:
# Export from Zotero, compare DOIs, add missing entries to my-citations-for-web.bib
# Then run import and fix issues above