Configuration¶
lectrace.toml¶
lectrace.toml is optional. Running lectrace init generates it with commented-out defaults. Place it in your repo root.
[lectrace]
title = "My Lectures"
# Lecture files are auto-discovered. Name them with numeric prefixes to control
# sidebar order: 01_intro.py, 02_arrays.py, 03_sorting.py, ...
#
# To target a specific folder or pattern instead:
# lectures = ["lectures/*.py"]
#
# output = "_site"
Options¶
title¶
The site title shown in the browser tab.
lectures¶
List of glob patterns specifying which files to include. If omitted, lectrace auto-discovers all .py files in the repo that import from lectrace.
Multiple patterns:
output¶
The directory where the static site is written. Default: _site.
File naming conventions¶
Ordering¶
The sidebar lists lectures in alphabetical order. Use numeric prefixes to control sequence:
01_introduction.py → "Introduction"
02_big_o_notation.py → "Big-O Notation"
03_arrays.py → "Arrays"
10_graphs.py → "Graphs"
Helper files¶
Files starting with _ are never shown in the sidebar and are never auto-discovered. Use them for shared utilities:
_data.py ← shared datasets, ignored by lectrace
_helpers.py ← utility functions, ignored by lectrace
01_intro.py ← lecture ✓
Import helpers normally from your lecture files:
What gets ignored¶
Auto-discovery skips the following directories automatically:
__pycache__.venv,venv,envnode_modules.git_sitesite-packages
And skips files larger than 500 KB.
.gitignore¶
lectrace init appends these entries to your .gitignore:
The _site/ directory is the build output — it should not be committed. The cache file stores source hashes for incremental builds.