opengeos
myst-cv-template
Pythonโœจ New

An MyST template for CV

Last updated Jun 28, 2026
12
Stars
3
Forks
4
Issues
+1
Stars/day
Attention Score
44
Language breakdown
Python 78.7%
CSS 17.5%
Dockerfile 3.9%
โ–ธ Files click to expand
README

MyST CV Template

A reusable template for building academic CV websites with MyST Markdown, automatic CV PDF generation via Typst, blog support with RSS feeds, and automated deployment via GitHub Actions.

Features

  • MyST Markdown source format with Jupyter notebook integration
  • Automatic CV PDF generation from website content using Typst and modern-cv
  • Blog with RSS and Atom feed generation
  • Giscus comments (GitHub-backed) for blog posts
  • GitHub Pages deployment on push to main
  • Netlify PR previews for pull request review
  • Pre-commit hooks: Black, codespell, nbstripout for code quality

Quick Start

  • Click Use this template on GitHub to create a new repository
  • Update myst.yml with your site title, description, and table of contents
  • Replace placeholder content in pages/ with your own
  • Update generate_cv.py preamble with your author information
  • Update generate_rss.py with your site URL and metadata
  • Push to GitHub to trigger automated builds

Project Structure

.
โ”œโ”€โ”€ myst.yml                    # MyST configuration
โ”œโ”€โ”€ index.md                    # Landing page (bio, highlights, news)
โ”œโ”€โ”€ custom.css                  # Custom CSS styling
โ”œโ”€โ”€ requirements.txt            # Python dependencies
โ”œโ”€โ”€ generate_cv.py              # CV PDF generation script
โ”œโ”€โ”€ generate_rss.py             # RSS/Atom feed generation script
โ”œโ”€โ”€ inject_comments.py          # Giscus comment injection script
โ”œโ”€โ”€ Dockerfile                  # Docker build for full site
โ”œโ”€โ”€ logo.png                    # Site logo
โ”œโ”€โ”€ fav.ico                     # Favicon
โ”œโ”€โ”€ CNAME                       # Custom domain (optional)
โ”œโ”€โ”€ pages/                      # Site content
โ”‚   โ”œโ”€โ”€ about.md                # Biography, education, appointments
โ”‚   โ”œโ”€โ”€ research.md             # Publications, grants, patents
โ”‚   โ”œโ”€โ”€ software.md             # Open-source software projects
โ”‚   โ”œโ”€โ”€ teaching.md             # Courses, mentoring
โ”‚   โ”œโ”€โ”€ talks.md                # Workshops, invited talks, presentations
โ”‚   โ”œโ”€โ”€ awards.md               # Awards & honors
โ”‚   โ”œโ”€โ”€ services.md             # Professional & institutional services
โ”‚   โ”œโ”€โ”€ contact.md              # Contact information
โ”‚   โ”œโ”€โ”€ news.md                 # News log by year
โ”‚   โ”œโ”€โ”€ blog.md                 # Blog landing page
โ”‚   โ””โ”€โ”€ images/                 # Shared images
โ”œโ”€โ”€ blog/                       # Blog posts
โ”‚   โ””โ”€โ”€ sample-post.md          # Sample blog post
โ”œโ”€โ”€ .pre-commit-config.yaml     # Pre-commit hook configuration
โ”œโ”€โ”€ CONTRIBUTING.md              # Contribution guidelines
โ”œโ”€โ”€ CONDUCT.md                   # Code of conduct
โ””โ”€โ”€ .github/workflows/
    โ”œโ”€โ”€ build.yml               # PR preview builds (Netlify)
    โ””โ”€โ”€ deploy.yml              # Production deployment (GitHub Pages)

Customization

Site Metadata

Edit myst.yml:

  • project.title: your name
  • project.description: site description
  • project.keywords: your research keywords
  • site.parts.footer: footer links (CV PDF, social profiles)

Author Information for CV

Edit the genpreamble() function in generatecv.py:

  • firstname, lastname: your name
  • email, phone, homepage: contact details
  • github: GitHub username
  • address: office address
  • positions: job titles
  • custom: social media and academic profile links

Adding Pages

  • Create a new .md file in pages/
  • Add the file to project.toc in myst.yml

Adding Blog Posts

  • Create a new .md file in blog/ with frontmatter (title, date, authors, description, tags)
  • Add a card entry in pages/blog.md linking to the new post

Building Locally

Build HTML

pip install -r requirements.txt
npm install -g mystmd
myst build --html

The built site will be in _build/html/.

Build CV PDF

Prerequisites: Python 3.10+, Typst CLI, Font Awesome 6 desktop fonts (OTF) in a fonts/ directory.

# Generate Typst source from website markdown files
python generate_cv.py

Compile to PDF (with custom fonts and icons)

typst compile cv.typ cv.pdf --font-path ./fonts --ignore-system-fonts

The script reads content from pages/about.md, pages/research.md, pages/software.md, pages/teaching.md, pages/talks.md, pages/awards.md, and pages/services.md, then generates a cv.typ file with all CV sections.

Font Setup (for CV)

The CV requires Source Sans Pro (body font) and Font Awesome 6 (icons). Download both into a fonts/ directory:

mkdir -p fonts

Source Sans Pro (body font - ensures consistent spacing)

curl -sL "https://github.com/adobe-fonts/source-sans-pro/releases/download/3.006R/source-sans-pro-3.006R.zip" -o source-sans-pro.zip unzip -o source-sans-pro.zip -d /tmp/ssp cp /tmp/ssp/source-sans-pro-3.006R/OTF/*.otf fonts/

Font Awesome 6 (icons)

curl -sL "https://use.fontawesome.com/releases/v6.7.2/fontawesome-free-6.7.2-desktop.zip" -o fa.zip unzip -o fa.zip -d /tmp/fa cp /tmp/fa/fontawesome-free-6.7.2-desktop/otfs/*.otf fonts/

The --ignore-system-fonts flag in the compile command ensures Typst uses only these fonts, which gives consistent icon spacing across environments.

Generate RSS/Atom Feeds

pip install feedgen pyyaml
python generate_rss.py

Reads frontmatter from blog/*.md and writes rss.xml and atom.xml.

Building with Docker

Build and serve the site without installing any dependencies locally:

docker build -t myst-cv-template .
docker run --rm -p 3000:3000 -p 3100:3100 myst-cv-template

Then open http://localhost:3000 in your browser. If port 3000 is already in use, map to different ports (e.g., -p 3001:3000 -p 3101:3100 and open http://localhost:3001). The Docker image includes Node.js, Python, Typst, and all required fonts.

Deployment

GitHub Pages (production)

Pushes to main trigger the deploy.yml workflow, which:

  • Builds the HTML site with MyST
  • Generates rss.xml and atom.xml from blog posts
  • Generates cv.typ from markdown content
  • Compiles cv.pdf with Typst
  • Injects Giscus comments into blog posts
  • Deploys everything to GitHub Pages
The CV PDF will be available at https://your-site.com/cv.pdf.

Netlify (PR previews)

Pull requests trigger the build.yml workflow for preview deployments. Requires NETLIFYAUTHTOKEN and NETLIFYSITEID secrets.

GitHub Secrets

| Secret | Purpose | |--------|---------| | NETLIFYAUTHTOKEN | Netlify authentication for PR previews | | NETLIFYSITEID | Netlify site ID for PR previews |

License

MIT

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท opengeos/myst-cv-template ยท Updated daily from GitHub