Handle Jekyll-format files in OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix JSON feed differences: slugs, PDFs, DOI cache

- Normalize slugs to match Jekyll behavior (dots → dashes)
so geotessera-python-0.7 becomes geotessera-python-0-7

- Add filesystem PDF check to JSON feed attachments
matching arod_papers.ml behavior for static/papers/*.pdf

- Add DOI cache infrastructure for external references:
- New bushel_doi_entry.ml module for parsing data/doi.yml
- Load DOI entries in bushel_loader.ml
- Complete note_references with external DOI URL scanning
- Scan for doi.org URLs and publisher URLs (Elsevier, IEEE, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+12 -2
+12 -2
lib/frontmatter.ml
··· 36 36 with _ -> None 37 37 else None 38 38 39 + (** Normalize a slug to match Jekyll's slug_of_string behavior: 40 + map all non-alphanumeric characters to hyphens and lowercase. *) 41 + let normalize_slug s = 42 + let mapped = String.map (fun c -> 43 + match c with 44 + | 'a'..'z' | 'A'..'Z' | '0'..'9' -> c 45 + | _ -> '-' 46 + ) s in 47 + String.lowercase_ascii mapped 48 + 39 49 let slug_of_fname fname = 40 50 let basename = Filename.basename fname in 41 51 let no_ext = Filename.chop_extension basename in 42 52 match parse_date_prefix no_ext with 43 - | Some (date, slug) -> Ok (slug, Some date) 44 - | None -> Ok (no_ext, None) 53 + | Some (date, slug) -> Ok (normalize_slug slug, Some date) 54 + | None -> Ok (normalize_slug no_ext, None) 45 55 46 56 (** Parse frontmatter using yamlrw's streaming parser. 47 57 Uses multi-document support to find the document boundary,