Re: [pollen] A few questions about pollen capabilities

2019-05-27 Thread Matthew Butterick
> On May 27, 2019, at 5:24 PM, Joel McCracken wrote: > > The point is I was hoping to avoid having to rebuild the entire links table > every time I process another file. Here's a perhaps simpler way to do it that you could customize further. The Pollen sources define metas for each target

Re: [pollen] A few questions about pollen capabilities

2019-05-27 Thread Matthew Butterick
> On May 27, 2019, at 3:20 PM, Joel McCracken wrote: > > I suppose I might be able to do that, but I don't think it will solve my > overall problem. `pollen.rkt` gets loaded/computed repeatedly, once per page, > so it would lose context between pages. I would then have to re-compute it, >

Re: [pollen] A few questions about pollen capabilities

2019-05-27 Thread Joel Dueck
Why not just construct the links "blind"? For example (require net/uri-codec) (define (section name . elements) `(h2 [[id ,(uri-encode name)]] ,@elements)) (define (xref-link file id . elements) `(a [[href ,(format "~a.html#~a" file id)]] ,@elements)) (The uri-encode is

Re: [pollen] A few questions about pollen capabilities

2019-05-10 Thread Joel McCracken
Interesting, thank you. Will requiring the pollen file also have it output the compiled file to the filesystem? On Friday, May 10, 2019 at 11:30:22 AM UTC-4, Matthew Butterick wrote: > > You can also `(require "a-pollen-file.html.pm")` just like any Racket > module. Every Pollen source exports

Re: [pollen] A few questions about pollen capabilities

2019-05-10 Thread Matthew Butterick
You can also `(require "a-pollen-file.html.pm")` just like any Racket module. Every Pollen source exports `doc`, which is an S-expression representing the content of the document. > On May 10, 2019, at 8:12 AM, Joel McCracken wrote: > > The thing that worries me the most is the `racket

Re: [pollen] A few questions about pollen capabilities

2019-05-10 Thread Joel McCracken
Thank you, I think you answered all my issues. I will try it out. The thing that worries me the most is the `racket a-pollen-file.html.pm`, that seems like not the best way to try to treat a page as data. But I will see how far I can go! On Friday, May 10, 2019 at 4:44:04 AM UTC-4, Sorawee

Re: [pollen] A few questions about pollen capabilities

2019-05-10 Thread Sorawee Porncharoenwase
> > I want to be able to define aliases for pages, and be able to do like > `@link[the-alias]`. I noticed that i could use metas to implement this, so > that's fine. > > I want to have a CLI command that outputs all the aliases and the files > they refer to, as a way to remember the aliases.

[pollen] A few questions about pollen capabilities

2019-05-09 Thread Joel McCracken
One of the things that has held me back from using Pollen is what I perceive as potential limitations. I'm not sure if I want to use pollen, or use XML and write my own processor, and I am trying to make a decision. I had a number of questions when I started this post, but I decided to look at