That error confused me too. But I guess scribble/text and scribble/html are
only preprocessor languages. They aren't really part of "scribble".
http://docs.racket-lang.org/scribble-pp/index.html

[[
 I'd only used scribble/html to give a quick example of how
@include-template would work.
 But if you want to keep using scribble/html, here's a Makefile that I use
to turn .rkt files into static .html pages:
 https://github.com/nuprl/gtp/blob/gh-pages/Makefile
]]

On Sun, May 22, 2016 at 4:42 PM, Hendrik Boom <hend...@topoi.pooq.com>
wrote:

> On Sun, May 22, 2016 at 02:02:53PM -0400, Ben Greenman wrote:
>
> I copy-pasted your example and tried it twice.  The first time it
> failed, the second time it succeeded.
>
> It succeeded when I used your command
> : racket main.scrbl
>
> but failed when I called
> : scribble --html main.scrbl
> complaining that
>
> : dynamic-require: name is not provided
> :   name: 'doc
> :   module:
> : #<resolved-module-path:"/home/hendrik/write/tryscribble/main.scrbl">
> :   context...:
> :    /usr/share/racket/pkgs/scribble-lib/scribble/run.rkt: [running body]
>
> What's going on here?  Doesn't racket invoke scribble when given
> : #lang scribble/html
>
>
> > Try `include-template` from `web-server/templates`
> >
> http://docs.racket-lang.org/web-server/templates.html#%28form._%28%28lib._web-server%2Ftemplates..rkt%29._include-template%29%29
> >
> > (Maybe combined with `@literal` from `scribble/html`)
> > Example:
> >
> > ;; static.html
> > <h2>static content</h2>
> >
> >
> > ;; main.scrbl
> > #lang scribble/html
> > @require[web-server/templates]
> >
> > @html{
> >   @head{
> >     @title{webpage}
> >   }
> >   @body{
> >     @h2{content from scribble}
> >     @literal{@include-template{static.html}}
> >   }
> > }
> >
> >
> >
> > $ racket main.scrbl
> > <html><head><title>webpage</title></head>
> > <body><h2>content from scribble</h2>
> > <h2>static content</h2></body></html>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to