Re: [pollen] Combining multiple input pages into single output.

2019-02-15 Thread Ifeoluwapo Eleyinafe
Sir you are so so helpful. It worked. So simply. Thanks so much.

I placed this code at the bottom of the first file in my index.ptree and 
then I removed the file refrence from the index.ptree. Worked perfect. Had 
to use build path because windows is too awesome.

◊(define fileList (pagetree->list "index.ptree"))
◊(map (λ (fileName) (dynamic-require (build-path (current-directory) 
(symbol->string fileName)) 'doc)) fileList)

Thanks again.

On Thursday, February 14, 2019 at 1:28:10 PM UTC-5, Matthew Butterick wrote:
>
> `require` is a compile-time command, but `for-each` doesn't happen until 
> run time. So there is a timing mismatch.
>
> I think you probably want `dynamic-require`, which lets you import 
> identifiers at run time:
>
> ◊(map (λ (fileName) (dynamic-require fileName 'doc)) fileList)
>
> As for generating a list of files, you can do that whatever way suits you 
> — don't overlook the `pagetree->list` function.
>
>
> On Feb 14, 2019, at 8:11 AM, Ifeoluwapo Eleyinafe  > wrote:
>
> Or maybe just do this?
>
> ◊(define fileList (file->list index.ptree)) ;Not sure how to get the 
> exact path here
> ◊(for-each (lambda (fileName) 
>  ◊(require (prefix-in nextChapter: fileName)) ;
>  ◊nextChapter:doc
> )
> fileList)
>
> On Thursday, February 14, 2019 at 10:32:22 AM UTC-5, Ifeoluwapo Eleyinafe 
> wrote:
>>
>> I know this is an old post but I'm hoping anyone can help. I'm trying to 
>> see is if this process can be automated for any files listed in the 
>> index.ptree. I'm thinking the code should look something like this:
>>
>> ◊(define fileList (file->list index.ptree)) ;Not sure how to get the 
>> exact path here
>> ◊(for-each (lambda (fileName) 
>>  ;all files suffixed with poly.pm so remove them and then convert 
>> the string to symbol
>>  ◊(define nextChapter (string->symbol (string-replace fileName ".
>> poly.pm" ""))) 
>>  ◊(require (prefix-in nextChapter: fileName)) ;
>>  ◊nextChapter:doc
>> )
>> fileList)
>>
>>
>> I know this is probably terrible cringeworthy code but I don't know 
>> racket so well. Any help would be greatly appreciated. Thank you.
>>
>> On Sunday, September 24, 2017 at 3:53:34 PM UTC-4, Matthew Butterick 
>> wrote:
>>>
>>> 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  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 ◊doc)
>>> 
>>>
>>> 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  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 ◊doc)
>>> 
>>>
>>> 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  a 
>>> écrit :
>>>

 On Sep 23, 2017, at 3:29 AM, Karim Chellaoui  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 

Re: [pollen] Combining multiple input pages into single output.

2019-02-14 Thread Ifeoluwapo Eleyinafe
Thanks so much. I'll get working on it to see how it pans out. 
pagetree->list looks like exactly what I need and I think 'get-pagetree' 
will be useful too.

Thanks again.

On Thursday, February 14, 2019 at 1:28:10 PM UTC-5, Matthew Butterick wrote:
>
> `require` is a compile-time command, but `for-each` doesn't happen until 
> run time. So there is a timing mismatch.
>
> I think you probably want `dynamic-require`, which lets you import 
> identifiers at run time:
>
> ◊(map (λ (fileName) (dynamic-require fileName 'doc)) fileList)
>
> As for generating a list of files, you can do that whatever way suits you 
> — don't overlook the `pagetree->list` function.
>
>
> On Feb 14, 2019, at 8:11 AM, Ifeoluwapo Eleyinafe  > wrote:
>
> Or maybe just do this?
>
> ◊(define fileList (file->list index.ptree)) ;Not sure how to get the 
> exact path here
> ◊(for-each (lambda (fileName) 
>  ◊(require (prefix-in nextChapter: fileName)) ;
>  ◊nextChapter:doc
> )
> fileList)
>
> On Thursday, February 14, 2019 at 10:32:22 AM UTC-5, Ifeoluwapo Eleyinafe 
> wrote:
>>
>> I know this is an old post but I'm hoping anyone can help. I'm trying to 
>> see is if this process can be automated for any files listed in the 
>> index.ptree. I'm thinking the code should look something like this:
>>
>> ◊(define fileList (file->list index.ptree)) ;Not sure how to get the 
>> exact path here
>> ◊(for-each (lambda (fileName) 
>>  ;all files suffixed with poly.pm so remove them and then convert 
>> the string to symbol
>>  ◊(define nextChapter (string->symbol (string-replace fileName ".
>> poly.pm" ""))) 
>>  ◊(require (prefix-in nextChapter: fileName)) ;
>>  ◊nextChapter:doc
>> )
>> fileList)
>>
>>
>> I know this is probably terrible cringeworthy code but I don't know 
>> racket so well. Any help would be greatly appreciated. Thank you.
>>
>> On Sunday, September 24, 2017 at 3:53:34 PM UTC-4, Matthew Butterick 
>> wrote:
>>>
>>> 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  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 ◊doc)
>>> 
>>>
>>> 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  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 ◊doc)
>>> 
>>>
>>> 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  a 
>>> écrit :
>>>

 On Sep 23, 2017, at 3:29 AM, Karim Chellaoui  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, 

Re: [pollen] Combining multiple input pages into single output.

2019-02-14 Thread Matthew Butterick
`require` is a compile-time command, but `for-each` doesn't happen until run 
time. So there is a timing mismatch.

I think you probably want `dynamic-require`, which lets you import identifiers 
at run time:

◊(map (λ (fileName) (dynamic-require fileName 'doc)) fileList)

As for generating a list of files, you can do that whatever way suits you — 
don't overlook the `pagetree->list` function.


> On Feb 14, 2019, at 8:11 AM, Ifeoluwapo Eleyinafe  
> wrote:
> 
> Or maybe just do this?
> 
> ◊(define fileList (file->list index.ptree)) ;Not sure how to get the exact 
> path here
> ◊(for-each (lambda (fileName) 
>  ◊(require (prefix-in nextChapter: fileName)) ;
>  ◊nextChapter:doc
> )
> fileList)
> 
> On Thursday, February 14, 2019 at 10:32:22 AM UTC-5, Ifeoluwapo Eleyinafe 
> wrote:
> I know this is an old post but I'm hoping anyone can help. I'm trying to see 
> is if this process can be automated for any files listed in the index.ptree. 
> I'm thinking the code should look something like this:
> 
> ◊(define fileList (file->list index.ptree)) ;Not sure how to get the exact 
> path here
> ◊(for-each (lambda (fileName) 
>  ;all files suffixed with poly.pm so remove them and then convert the 
> string to symbol
>  ◊(define nextChapter (string->symbol (string-replace fileName ".poly.pm 
> " ""))) 
>  ◊(require (prefix-in nextChapter: fileName)) ;
>  ◊nextChapter:doc
> )
> fileList)
> 
> 
> I know this is probably terrible cringeworthy code but I don't know racket so 
> well. Any help would be greatly appreciated. Thank you.
> 
> On Sunday, September 24, 2017 at 3:53:34 PM UTC-4, Matthew Butterick wrote:
> 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 > 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 ◊doc)
>> 
>> 
>> 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 > 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 ◊doc)
>> 
>> 
>> 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 > a 
>> écrit :
>> 
>>> On Sep 23, 2017, at 3:29 AM, Karim Chellaoui > 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 

Re: [pollen] Combining multiple input pages into single output.

2019-02-14 Thread Ifeoluwapo Eleyinafe
I know this is an old post but I'm hoping anyone can help. I'm trying to 
see is if this process can be automated for any files listed in the 
index.ptree. I'm thinking the code should look something like this:

◊(define fileList (file->list index.ptree)) ;Not sure how to get the exact 
path here
◊(for-each (lambda (fileName) 
 ;all files suffixed with poly.pm so remove them and then convert the 
string to symbol
 ◊(define nextChapter (string->symbol (string-replace fileName 
".poly.pm" ""))) 
 ◊(require (prefix-in nextChapter: fileName)) ;
 ◊nextChapter:doc
)
fileList)


I know this is probably terrible cringeworthy code but I don't know racket 
so well. Any help would be greatly appreciated. Thank you.

On Sunday, September 24, 2017 at 3:53:34 PM UTC-4, Matthew Butterick wrote:
>
> 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  > 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 ◊doc)
> 
>
> 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  > 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 ◊doc)
> 
>
> 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  > a écrit :
>
>>
>> On Sep 23, 2017, at 3:29 AM, Karim Chellaoui > > 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.


Re: [pollen] Combining multiple input pages into single output.

2017-09-24 Thread Karim Chellaoui
This works! Thanks a lot!

Le dim. 24 sept. 2017 à 21:53, Matthew Butterick  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  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 ◊doc)
> 
>
> 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  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 ◊doc)
> 
>
> 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  a écrit :
>
>>
>> On Sep 23, 2017, at 3:29 AM, Karim Chellaoui  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.


Re: [pollen] Combining multiple input pages into single output.

2017-09-24 Thread Matthew Butterick
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  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 ◊doc)
> 
> 
> 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  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 ◊doc)
> 
> 
> With this configuration I end up with and empty page when 
> renderingindex.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  > a écrit :
> 
>> On Sep 23, 2017, at 3:29 AM, Karim Chellaoui > > 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.


Re: [pollen] Combining multiple input pages into single output.

2017-09-23 Thread Matthew Butterick

> On Sep 23, 2017, at 3:29 AM, Karim Chellaoui  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.