Subdirectories and here, previous, and next #211

Closed
opened 5 years ago by sturgman · 2 comments
sturgman commented 5 years ago (Migrated from github.com)

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.

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.
mbutterick commented 5 years ago (Migrated from github.com)

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.)

> 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.)
sturgman commented 5 years ago (Migrated from github.com)

Fair enough!

Note that tutorial one also says: " For each directory in your project,
starting at the top, the project server displays a dashboard in your web
browser. The dashboard gives you an overview of the files in the directory,
and links to view them." which at the time gave me the impression that I
could do what I was doing...

I'll follow the instructions more closely from now on! 😇

On Thu, Nov 14, 2019 at 12:02 PM Matthew Butterick notifications@github.com
wrote:

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.)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mbutterick/pollen/issues/211?email_source=notifications&email_token=AA7ODQACT5YERA7EMZD5B4TQTWACZA5CNFSM4JNOPNP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEECRRHY#issuecomment-553982111,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA7ODQADTBTADIC3HK5MZLDQTWACZANCNFSM4JNOPNPQ
.

Fair enough! Note that tutorial one also says: " For each directory in your project, starting at the top, the project server displays a dashboard in your web browser. The dashboard gives you an overview of the files in the directory, and links to view them." which at the time gave me the impression that I could do what I was doing... I'll follow the instructions more closely from now on! 😇 On Thu, Nov 14, 2019 at 12:02 PM Matthew Butterick <notifications@github.com> wrote: > 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.) > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/mbutterick/pollen/issues/211?email_source=notifications&email_token=AA7ODQACT5YERA7EMZD5B4TQTWACZA5CNFSM4JNOPNP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEECRRHY#issuecomment-553982111>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AA7ODQADTBTADIC3HK5MZLDQTWACZANCNFSM4JNOPNPQ> > . >
Sign in to join this conversation.
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#211
Loading…
There is no content yet.