You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
aoc-racket/helper.rkt

22 lines
764 B
Racket

9 years ago
#lang at-exp racket/base
(require scribble/manual scribble/html-properties
scribble/core)
9 years ago
(provide (all-defined-out))
9 years ago
(require (for-syntax racket/base racket/syntax) racket/runtime-path)
(provide (for-syntax #%datum))
9 years ago
(define (aoc-title which)
(define which-str (number->string which))
9 years ago
(define day-x (format "day-~a" which-str))
(define day-prefix (format "~a-" day-x))
9 years ago
@title[#:style manual-doc-style]{Day @which-str})
9 years ago
9 years ago
(define-syntax (link-rp stx)
(syntax-case stx ()
[(_ where text-args ...)
(with-syntax ([rp-name (generate-temporary)])
#'(begin
(require racket/runtime-path)
(define-runtime-path rp-name where)
(element (style #f (list (link-resource where)))
text-args ...)))]))