Custom Markup in Pollen

Pollen Source

#lang pollen ◊(require racket/match) ◊(define (paper #:title title #:authors authors #:url url #:year year) ◊span{ ◊a[#:href url]{◊em{◊title}}. ◊(concatenate-authors authors), ◊(number->string year)}) ◊(define (concatenate-authors authors) (match authors [(list x) x] [(list x y) (string-append x " and " y)] [(list x ys ..2) (string-append x ", " (concatenate-authors ys))])) ◊(define (keyword #:stands-for [stands-for #f] content) ◊span{◊(if stands-for ◊abbr[#:title stands-for]{◊content} content)}) ◊h2{Papers} ◊ul{ ◊li{ ◊paper[#:title "A Categorical Theory of Patches" #:authors '("Samuel Mimram" "Cinzia Di Giusto") #:url "https://arxiv.org/abs/1311.3903" #:year 2013] } } ◊h2{Keywords} ◊ul{ ◊li{ ◊keyword[#:stands-for "version control system"]{VCS} } ◊li{ ◊keyword{Git} } }

Rendered HTML

Papers

Keywords

Referenced: