This works! Thanks a lot! Le dim. 24 sept. 2017 à 21:53, Matthew Butterick <m...@mbtype.com> a écrit :
> If you use the submodule technique, you need to `provide` the identifiers > from inside the submodule, then you also need to insert them in the body of > the source file: > > #lang pollen > > ◊(module art1-submod racket/base > (require "article1.html.pm") > (provide doc)) > ◊(require (prefix-in art1: 'art1-submod)) > > ◊art1:doc > > ◊(module art2-submod racket/base > (require "article2.html.pm") > (provide doc)) > ◊(require (prefix-in art2: 'art2-submod)) > > ◊art2:doc > > > Though looking at it now, I don't remember why I recommended submodules. > You can just do this: > > #lang pollen > > ◊(require (prefix-in art1: "article1.html.pm")) > > ◊art1:doc > > ◊(require (prefix-in art2: "article2.html.pm")) > > ◊art2:doc > > > > > On Sep 24, 2017, at 10:32 AM, Karim Chellaoui <fogiaf...@gmail.com> wrote: > > I have four files: > - article1.html.pm and article2.html.pm looking like this: > #lang pollen > ◊(define article1 "Article 1") > ◊h2{◊article1} > - index.html.pm > #lang pollen > ◊(module art1-submod racket/base (require "article1.html.pm")) > ◊(require (prefix-in art1: 'art1-submod)) > ◊(module art2-submod racket/base (require "article2.html.pm")) > ◊(require (prefix-in art2: 'art2-submod)) > - template.html > <html><head><meta charset="UTF-8"/></head> > <body style="background: #f6f6f6"> > <div style="background: white; margin: 3em; border:10px double gray; > padding: 3em; font-size: 130%;"> > <hr/> > ◊(->html ◊doc) > </div></body></html> > > With this configuration I end up with and empty page when rendering > index.html.pm . I guess I need to call for the art1-submod and > art2-submod, I just don't know how to do it? > > > > > > On Sep 24, 2017, at 10:32 AM, Karim Chellaoui <fogiaf...@gmail.com> wrote: > > I have four files: > - article1.html.pm and article2.html.pm looking like this: > #lang pollen > ◊(define article1 "Article 1") > ◊h2{◊article1} > - index.html.pm > #lang pollen > ◊(module art1-submod racket/base (require "article1.html.pm")) > ◊(require (prefix-in art1: 'art1-submod)) > ◊(module art2-submod racket/base (require "article2.html.pm")) > ◊(require (prefix-in art2: 'art2-submod)) > - template.html > <html><head><meta charset="UTF-8"/></head> > <body style="background: #f6f6f6"> > <div style="background: white; margin: 3em; border:10px double gray; > padding: 3em; font-size: 130%;"> > <hr/> > ◊(->html ◊doc) > </div></body></html> > > With this configuration I end up with and empty page when rendering > index.html.pm . I guess I need to call for the art1-submod and > art2-submod, I just don't know how to do it? > > Le sam. 23 sept. 2017 à 16:33, Matthew Butterick <m...@mbtype.com> a écrit : > >> >> On Sep 23, 2017, at 3:29 AM, Karim Chellaoui <fogiaf...@gmail.com> wrote: >> >> I'm new to Pollen, I read the tutorial but couldn't find the way to apply >> this answer. I'm getting confused: how to effectively insert submodule >> ch1-submod in the main file? I tried different functions but it seems that >> I'm missing something. >> >> >> Perhaps post an example of code that isn't working? That will make it >> easier to pinpoint the problem. >> > > -- You received this message because you are subscribed to the Google Groups "Pollen" group. To unsubscribe from this group and stop receiving emails from it, send an email to pollenpub+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.