Index: pollen.rkt ================================================================== --- pollen.rkt +++ pollen.rkt @@ -3,14 +3,14 @@ ; SPDX-License-Identifier: BlueOak-1.0.0 ; This file is licensed under the Blue Oak Model License 1.0.0. ;; Functions for tags and template content used in all Pollen source files and templates. -(require (for-syntax racket/base +(require (for-syntax "targets.rkt" + racket/base racket/syntax - syntax/parse - pollen/setup)) + syntax/parse)) (require pollen/tag pollen/setup "cache.rkt" "tags-html.rkt" @@ -19,15 +19,16 @@ (provide (all-defined-out) (all-from-out "crystalize.rkt" "snippets-html.rkt" "cache.rkt")) (module setup racket/base - (require syntax/modresolve + (require "targets.rkt" + syntax/modresolve racket/runtime-path pollen/setup) (provide (all-defined-out)) - (define poly-targets '(html)) + (define poly-targets targets) (define allow-unbound-ids? #f) (define block-tags (append '(title style dt note) default-block-tags)) (define-runtime-path tags-html.rkt "tags-html.rkt") @@ -51,11 +52,11 @@ ;; (define-syntax (poly-branch-kwargs-tag stx) (syntax-parse stx [(_ TAG:id) (with-syntax ([((POLY-TARGET POLY-FUNC) ...) - (for/list ([target (in-list (setup:poly-targets))]) + (for/list ([target (in-list targets)]) (list target (format-id stx "~a-~a" target #'TAG)))] [DEFAULT-FUNC (format-id stx "html-~a" #'TAG)]) #'(define-tag-function (TAG attributes elems) (case (current-poly-target) [(POLY-TARGET) (POLY-FUNC attributes elems)] ... @@ -66,11 +67,11 @@ ;; (define-syntax (poly-branch-tag stx) (syntax-parse stx [(_ TAG:id) (with-syntax ([((POLY-TARGET POLY-FUNC) ...) - (for/list ([target (in-list (setup:poly-targets))]) + (for/list ([target (in-list targets)]) (list target (format-id stx "~a-~a" target #'TAG)))] [DEFAULT-FUNC (format-id stx "html-~a" #'TAG)]) #'(define (TAG . args) (case (current-poly-target) [(POLY-TARGET) (apply POLY-FUNC args)] ... ADDED targets.rkt Index: targets.rkt ================================================================== --- targets.rkt +++ targets.rkt @@ -0,0 +1,5 @@ +#lang racket/base + +(provide targets) + +(define targets '(html))