-
Notifications
You must be signed in to change notification settings - Fork 0
pollen performance and folders #34
Comments
|
ahh. wait, so how would I grab the file of a subdirectory?
edit: ohh wait.. so I have to use (string->path) ? |
See Nesting pagetrees for one approach. |
@mbutterick so how would i generate a table of contents? i'm unsure how to import index.ptree |
If you want to import ALL the data, you can just You can also selectively call pagetree helper functions like |
Got it! One more question(sorry, a little new to racket), how do I flatten out a nested list?
I've been doing |
`match` from `racket/match` is a good tool for this:
```
(match '((a b) (c d) (e f))
[(list (list first second) ...)
second])
; ==> '(b d f)
```
See the docs on match
<https://docs.racket-lang.org/reference/match.html?q=match#%28form._%28%28lib._racket%2Fmatch..rkt%29._match%29%29>
for more information
There's also `flatten` from `racket/list`
<https://docs.racket-lang.org/reference/pairs.html?q=flatten#%28def._%28%28lib._racket%2Flist..rkt%29._flatten%29%29>,
but `match` would probably work better for you here.
…On Wed, Apr 15, 2020 at 7:22 PM jestarray ***@***.***> wrote:
Got it! One more question(sorry, a little new to racket), how do I flatten
out a nested list?
'((ul
(li (a ((href "00-Intro/00-Overview.html")) "00-Intro/00-Overview.html"))
(li (a ((href "00-Intro/01-Language.html")) "00-Intro/01-Language.html"))
(li (a ((href "00-Intro/02-Boolean_Logic.html")) "00-Intro/02-Boolean_Logic.html"))
(li (a ((href "00-Intro/03-Optimization.html")) "00-Intro/03-Optimization.html"))
(li (a ((href "00-Intro/04-NAND_HDL.html")) "00-Intro/04-NAND_HDL.html"))
(li (a ((href "00-Intro/05-Multibit_buses.html")) "00-Intro/05-Multibit_buses.html")))
(ul
(li (a ((href "01-ALU/01-BinaryNumbers.html")) "01-ALU/01-BinaryNumbers.html"))
(li (a ((href "01-ALU/02-BinaryAddition.html")) "01-ALU/02-BinaryAddition.html"))
(li (a ((href "01-ALU/03-ALU.html")) "01-ALU/03-ALU.html"))))
I've been doing (car l) and (car (cdr l)) and this isn't going to scale
well..
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIDEVDM2R4DENEW2MJUN23RMZTVRANCNFSM4K72IMUA>
.
|
Also look at the functions in
|
So every page I have has a Doing
Is this the correct way to grab dates from every page? |
That should work, though the error doesn’t make sense — it seems to be a file-permissions error triggered by something DrRacket is doing, not by Pollen per se. (Try running the same file from You can also store a time value in the |
Same error... I'm calling it correctly right? |
I feel it's going to be a back and forth conversation with little information gain to help you debugging if we just keep doing this. Do you have a link to your project? Or can you provide us a minimal template file / |
Coming from little experience with web dev, pollen is great!
I have a few questions:
1: What is causing pollen take some time to generate pages since js based tools do it instantaneously?
2: I'd like to separate my pages into folders but I'm not sure how to write a directory down in the .ptree which is located at the root. Does every folder need it's own .ptree file?
The text was updated successfully, but these errors were encountered: