After cloning the repository:
# Install Node.js dependencies (CSS/JS minification tools)
cd utils && npm install
# Install R packages (in R console)
renv::restore()The utils/purge_css.sh script will auto-install npm dependencies if utils/node_modules/ doesn't exist.
The website is automatically built and deployed via GitHub Actions whenever changes are pushed to the main branch. See .github/workflows/publish.yml for details.
The publishing workflow uses several caching strategies to speed up builds:
- npm dependencies - Cached via
actions/setup-node@v4usingutils/package-lock.json - Quarto _freeze directory - Cached via
actions/cache@v4to avoid re-rendering unchanged content - R packages - Cached via
r-lib/actions/setup-renv@v2usingrenv.lock - Quarto, Pandoc, and R installations - Cached by the respective setup actions
The cache keys are based on file hashes (for npm and Quarto) and lockfile contents (for R packages), ensuring cache invalidation when dependencies or content changes.
To preview changes locally before pushing:
quarto renderThis will generate the website in the _site/ directory. You can preview it locally by opening _site/index.html in your browser or by running quarto preview.
The utils/check_links.sh script scans all rendered HTML files in _site/ for broken links. It checks:
- External links (404 errors, timeouts, connection failures)
- Soft 404s (pages that return 200 but show "not found" content)
- Local file references
If broken links are found, you'll be prompted whether to continue publishing or stop to fix them.
Configuration: Edit utils/linkcheck.config.json to customize:
siteDir: Directory to scan (default:_site)concurrency: Number of parallel requests (default: 20)timeout: Request timeout in milliseconds (default: 10000)excludePatterns: URL patterns to skip (mailto:, tel:, etc.)skipDomains: Domains to skip checkingsoftNotFoundPatterns: Patterns that indicate soft 404 pages
Skip the check: Use ./utils/check_links.sh --skip to skip link checking.
It is included to run automatically after quarto render in the _quarto.yml config file.
Posts are Quarto documents .qmd files, which are stored in the posts directory. The posts directory is organized by year. To add a new post:
- Create a new folder in the corresponding year directory, e.g.
posts/2024/new-post - Create a new
.qmdfile in the new folder, e.g.posts/2024/new-post/index.qmd
It should have a YAML front matter with the following fields:
---
title: ""
subtitle: ""
categories: []
date: ""
---- Write the content of the post in the
.qmdfile - Commit and push the changes to the
mainbranch - GitHub Actions will automatically build and deploy the website
- The new post will be available at
https://venpopov.com/posts/2024/new-post/
Use the shell command add_new_post. This is a bash script in ~/scripts and also available on my Github