fix the problem of fail to render non-html output format in project s… #212

Closed
shen390s wants to merge 0 commits from master into master
shen390s commented 4 years ago (Migrated from github.com)
  1. Create directory with:
    /tmp/x4 rshen @ pc13f ᐅ ls
    cv.poly.pm pollen.rkt template.ltx.p template.txt.p

/tmp/x4 rshen @ pc13f ᐅ cat cv.poly.pm
#lang pollen

◊heading{Brennan Huff}

Today is ◊(get-date). I ◊emph{really} want this job.

Yes, this is the worst résumé ever. Yours, I’m certain, would be better.

See you.

/tmp/x4 rshen @ pc13f ᐅ cat pollen.rkt
#lang racket/base
(require racket/date txexpr pollen/setup)
(provide (all-defined-out))

(module setup racket/base
(provide (all-defined-out))
(define poly-targets '(html txt ltx)))

(define (get-date)
(date->string (current-date)))

(define (heading . elements)
(case (current-poly-target)
[(ltx) (apply string-append `("{\huge " ,@elements "}"))]
[(txt) (map string-upcase elements)]
[else (txexpr 'h2 empty elements)]))

(define (emph . elements)
(case (current-poly-target)
[(ltx) (apply string-append ("{\\bf " ,@elements "}"))] [(txt) ("" ,@elements "")]
[else (txexpr 'strong empty elements)]))
/tmp/x4 rshen @ pc13f ᐅ cat template.ltx.p
\documentclass[a4paper,12pt]{letter}
\begin{document}
◊(local-require racket/list)
◊(apply string-append (filter string? (flatten doc)))
\end{document}

/tmp/x4 rshen @ pc13f ᐅ cat template.txt.p
◊(local-require racket/list)
◊(apply string-append (filter string? (flatten doc)))

  1. start server

  2. open http://localhost:8080/index.ptree

  3. click cv.txt

  4. get following in console
    ....
    pollen: /cv.txt
    pollen: rendering /cv.poly.pm as html
    pollen: rendered /cv.html (347 ms)
    pollen: can't find /cv.txt
    pollen: /error.css

  5. also 404 error in browser

1. Create directory with: /tmp/x4 rshen @ pc13f ᐅ ls cv.poly.pm pollen.rkt template.ltx.p template.txt.p /tmp/x4 rshen @ pc13f ᐅ cat cv.poly.pm #lang pollen ◊heading{Brennan Huff} Today is ◊(get-date). I ◊emph{really} want this job. Yes, this is the worst résumé ever. Yours, I’m certain, would be better. See you. /tmp/x4 rshen @ pc13f ᐅ cat pollen.rkt #lang racket/base (require racket/date txexpr pollen/setup) (provide (all-defined-out)) (module setup racket/base (provide (all-defined-out)) (define poly-targets '(html txt ltx))) (define (get-date) (date->string (current-date))) (define (heading . elements) (case (current-poly-target) [(ltx) (apply string-append `("{\\huge " ,@elements "}"))] [(txt) (map string-upcase elements)] [else (txexpr 'h2 empty elements)])) (define (emph . elements) (case (current-poly-target) [(ltx) (apply string-append `("{\\bf " ,@elements "}"))] [(txt) `("**" ,@elements "**")] [else (txexpr 'strong empty elements)])) /tmp/x4 rshen @ pc13f ᐅ cat template.ltx.p \documentclass[a4paper,12pt]{letter} \begin{document} ◊(local-require racket/list) ◊(apply string-append (filter string? (flatten doc))) \end{document} /tmp/x4 rshen @ pc13f ᐅ cat template.txt.p ◊(local-require racket/list) ◊(apply string-append (filter string? (flatten doc))) 2. start server 3. open http://localhost:8080/index.ptree 4. click cv.txt 5. get following in console .... pollen: /cv.txt pollen: rendering /cv.poly.pm as html pollen: rendered /cv.html (347 ms) pollen: can't find /cv.txt pollen: /error.css 6. also 404 error in browser
mbutterick commented 4 years ago (Migrated from github.com)

Thanks — I agree this is a bug, but I had to fix it in a different way.

Thanks — I agree this is a bug, but I had to fix it in a different way.
shen390s commented 4 years ago (Migrated from github.com)

Thanks.
The problem get solved.

Thanks. The problem get solved.
Please reopen this pull request to perform a merge.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b master master
git pull origin master

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff master
git push origin master
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen#212
Loading…
There is no content yet.