Dear all —


This is my first post to the group. I’ve been experimenting with pollen a 
little since its first release, but gone back and forth on whether it’s too 
hard for me to use on an actual project. In any case, I’m playing with it 
again and was curious if you have any suggestions regarding my current 
conundrum. 


My project requires extensionless urls but I don’t have access to the 
webserver’s .htaccess. In other words, I want to generate extensionless 
pollen output, ie. “foo” and not “foo.html”.


My current hack is two fold. In pollen.rkt, I define a function no-ext as 
follows


;extensionless urls

(require sugar)

(define (no-ext x)

  (if (string=? (getenv "POLLEN") "PRODUCTION") (remove-ext x) x))


and then in the navigation section of template.html I call ◊(no-ext here), 
◊(no-ext (next here) and so on. During dev this does nothing (as not to 
break the pollen server), but when I setup the environment variable this 
fixes the page links for deployment. Step two is to use a shell command to 
remove the .html extension from the actual file, before I upload it to the 
server.


I find this a bit (read: very) ugly :)


Question #1: is there a way I can override the here, next, previous 
functions in pollen.rkt (so in template.html I can just use ◊here instead 
of ◊(no-ext here)?


Question #2: is there a better solution I am missing? I understand that I 
can use template.html to save a copy of my output to an alternative 
filename (like in the pdf output examples) but I will still break the 
functionality of the pollen server if I change the navigation links while 
developing.


Your collective wisdom is very much welcomed! 


Thanks in advance and warm regards,


Alexander

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to