otherjoel / try-pollen Goto Github PK
View Code? Open in Web Editor NEW📔🌼 An example website/book created with Pollen.
Home Page: https://thelocalyarn.com/excursus/secretary/
License: Other
📔🌼 An example website/book created with Pollen.
Home Page: https://thelocalyarn.com/excursus/secretary/
License: Other
Want to be able to demonstrate Pollen's multiple output target capability by creating a print-ready PDF version of the site via LaTeX.
.html.pm
to .poly.pm
Here and there: missing spaces, a missing glyph, hyphens in place of em-dashes, superfluous periods.
I'm remaking my blog in pollen, and went looking for a RSS impl. Found yours. I dont see a licsense anywhere in this. Do you mind if I copy/modify the RSS feed code you have?
This goes for other code, if you don't mind. Of course I won't touch any prose/design.
Or not -- Just let me know. TY!
For example, when rendering a test file (using pdflatex
), functions such as blockcode
and section
fail to render leaving the following trace:
pollen: rendering generated pagetree for directory /home/divya/src/racket/test-pollen/
pollen: rendering /example.poly.pm as html
pollen: rendered /example.html (693 ms)
pollen: rendering /example.poly.pm as ltx
pollen: rendered /example.ltx (982 ms)
pollen: rendering /example.poly.pm as pdf
string-append: contract violation
expected: string?
given: '(txt "\\begin{center}" "This text should be in the center." "\\end{center}")
context...:
body of 'g5817
/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/render.rkt:411:0: render-markup-or-markdown-source
/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/render.rkt:337:25: render
/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/cache-utils.rkt:124:2: generate-dest-file
/usr/share/racket/collects/file/cache.rkt:63:2: fetch-and-continue
/usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3
/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/cache-utils.rkt:114:0: cache-ref!
/usr/share/racket/collects/racket/private/more-scheme.rkt:377:2: hash-ref!
/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/render.rkt:277:0: render-to-file-base
/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/render.rkt:183:25: render-batch
/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/command.rkt:149:9: render-one-dir
/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/external/logging.rkt:46:0: with-intercepted-logging
body of (submod "/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/command.rkt" raco)
/usr/share/racket/collects/raco/raco.rkt:41:0
body of "/usr/share/racket/collects/raco/raco.rkt"
body of "/usr/share/racket/collects/raco/main.rkt"
The minimal pollen.rkt
that was used is the following:
#lang racket
(require pollen/decode
pollen/setup
txexpr)
(module setup racket/base
(provide (all-defined-out))
(define poly-targets '(html ltx pdf)))
(provide (all-defined-out))
(define (section title . text)
(case (current-poly-target)
[(ltx pdf) `(txt "\\section*{" ,title "}"
"\\label{sec:" ,title ,(symbol->string (gensym)) "}"
,@text)]
[else `(section (h2 ,title) ,@text)]))
(define (blockcode . text)
(case (current-poly-target)
[(ltx pdf) `(txt "\\begin{verbatim}" ,@text "\\end{verbatim}")]
[else `(pre [[class "code"]] ,@text)]))
It appears that libuuid
is not available on Windows, as the install raco pkg install libuuid
fails, because ffi-lib: couldn't open "libuuid-1.dll"
(the module does not exist).
Is there a way to fix this?
Hi,
in your README file, the link to the blog is :
https://thelocalyarn/excursus/secretary/
instead of
https://thelocalyarn.com/excursus/secretary/
making it impossible to open :-)
Hello!
I really love this project, and am currently exploring it in my quest to build a pollen pipeline for my own written works. =)
I am trying to get a working make all
going, and keep running into this failure when the project tries to build the full flatland-book.ltx.
(I have the xetex
LaTeX engine installed and have successfully built the individual pages leading up to here, albeit I have changed the fonts to Ubuntu and Ubuntu Mono.)
Does this error look familiar? Do you know what the children.pm
that it is looking for is? I have not been able to find any reference to it in the repo.
For certain Pollen tags which need to return a list of X-expressions instead of a single one, I use the “decoder function” approach (described by MB). This is sort of ungainly, since my tags are now being handled by two different types of functions at two different stages of processing. Better to use the splice-me
approach as seen in this example pollen.rkt
file.
Hi,
I updated my system (Arch Linux, using pacman -Syu
). As a part of the process, Racket was upgraded to version 7.7 and I had to re-install Pollen. After that, compiling this repository (make all
) seems to work fine until it produces this error message upon compiling feed.xml.pp
and then halts:
[truncated]
raco pollen render feed.xml.pp
pollen: rendering feed.xml.pp
pollen: rendering /feed.xml.pp
path->complete-path: second argument is not a complete path
first argument: #<path:pollen.rkt>
second argument: #<path:posts/>
context...:
/home/me/.racket/7.7/pkgs/pollen/pollen/setup.rkt:21:0: get-path-to-override
/home/me/.racket/7.7/pkgs/pollen/pollen/setup.rkt:48:11: poly-targets
/home/me/.racket/7.7/pkgs/pollen/pollen/private/file-utils.rkt:176:11: ->markup-source-path
/home/me/documents/www/sandbox/digitalwords.net/try-pollen/feed.xml.pp:135:0: syndicate?
/usr/share/racket/collects/racket/private/list.rkt:256:2: filter
"/home/me/documents/www/sandbox/digitalwords.net/try-pollen/feed.xml.pp": [running body]
temp35_0
for-loop
run-module-instance!
do-dynamic-require
/home/me/.racket/7.7/pkgs/pollen/pollen/private/cache-utils.rkt:67:0: path->hash
/home/me/.racket/7.7/pkgs/pollen/pollen/private/cache-utils.rkt:124:2: generate-dest-file
/usr/share/racket/collects/file/cache.rkt:63:2: fetch-and-continue
/usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3
/home/me/.racket/7.7/pkgs/pollen/pollen/private/cache-utils.rkt:114:0: cache-ref!
/usr/share/racket/collects/racket/private/more-scheme.rkt:376:2: hash-ref!
...
make: *** [makefile:84: feed.xml] Error 1
I’m not sure how to fix this and where the problem actually lies.
I came accross the problem trying to compile my own Pollen website, as I based my feed.xml.pp
on yours (thanks! 💐).
Júda
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.