BibTeX to Jekyll Markdown Converter

A Python tool that converts BibTeX entries into Jekyll collection markdown files with duplicate detection and customizable formatting.

Features

Installation

This tool requires Python 3.6+ and uses the bibtexparser library.

# Initialize project (if starting fresh)
uv init bib_converter
cd bib_converter

# Install dependencies
uv add bibtexparser

Usage

Basic Usage

# Convert BibTeX file to markdown files
uv run python bib_to_markdown.py input.bib

# Specify custom output directory
uv run python bib_to_markdown.py input.bib _my_publications

Options

Examples

# Preview conversion
uv run python bib_to_markdown.py publications.bib --dry-run

# Convert with automatic overwrite
uv run python bib_to_markdown.py publications.bib _publications --force

# Convert to custom directory
uv run python bib_to_markdown.py my_pubs.bib ../my_site/_publications

Output Format

Each publication is converted to a markdown file with:

YAML Frontmatter

Content Sections

Duplicate Detection

The tool detects duplicates using:

  1. Exact DOI match: Publications with identical DOI values
  2. Title similarity: Publications with identical normalized titles
  3. Author+Year+Title: Same authors, year, and similar titles (>80% word overlap)

When duplicates are found, the first entry in each group is kept, and others are filtered out.

File Naming

Files are named using the pattern: {author}-{title-keywords}-{year}.md

Where:

Example: obrien-atmospheric-river-detection-2020.md

Jekyll Integration

To use with Jekyll:

  1. Add publications collection to _config.yml:
    collections:
      publications:
     output: true
     permalink: /:collection/:title/
    
  2. Create a publication layout (_layouts/publication.html)

  3. Create a publications listing page that iterates through site.publications

Supported BibTeX Fields

The converter recognizes and processes these BibTeX fields:

Error Handling

License

This tool was created for academic use. Feel free to modify and distribute as needed.