mbutterick/pollen

Subdirectories and `here`, `previous`, and `next`

sturgman opened this issue · 2 comments

Hello!

I am currently going through the pollen documentation setting up my directories as follows:

C:\some\path\pollentest
C:\some\path\pollentest\tutorial1
C:\some\path\pollentest\tutorial2
.
.
.

I ran raco pollen start from the pollentest directory. The decision to set up like this led me to confusion when doing the pagetree section of tutorial2. In particular, this snippet:

<html>
--
<head>
<meta charset="UTF-8">
<title>◊(select 'h1 doc), by MB</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>◊(->html doc)
The current page is called ◊\|here\|.
The previous is ◊\|(previous here)\|.
The next is ◊\|(next here)\|.
</body>
</html>

I could not get the previous and next pages to render. With this template, the rendered text looked like this:

The current page is barticle.html. The previous page is . The next page is .

It took me some time to realize that this was because of my directory structure. If I start pollen in the tutorial2 directory, everything works fine. I suspect this happens because ◊|here| returns the full path name of the current page relative to the place where I started the pollen server, while previous and select expect just the file name of the current page. Is that correct?

I any case, I just wanted to provide some feedback on my experience. I figure later in the documentation I will find how to deal with subdirectories.

The decision to set up like this led me to confusion … If I start pollen in the tutorial2 directory, everything works fine

The first tutorial asks readers to make a directory for the tutorial source files and then start the project server from this same directory. If what you’re saying is “when one follows the instructions, it works” then I agree 😉 (Or, if there’s an instruction that’s defective, I can fix it.)