Path /' does not rebuild index.html' #123

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

PRECONDITIONS

  1. Start the Pollen server and navigate to http://localhost:8080/.
  2. The index.html page from a previous build is shown.
  3. Change something on the source for index.html (e.g., index.html.pm).
  4. Refresh the browser.

CURRENT BEHAVIOR

The old index.html is shown, as a rebuild is not triggered.

EXPECTED BEHAVIOR

Fetching / causes a rebuild and the served page stays up-to-date with the source. Alternatively, do not serve index.html on the / route—though that is less desirable. The current behavior is a bad middle ground, as it goes against the principle of least surprise.

**PRECONDITIONS** 1. Start the Pollen server and navigate to http://localhost:8080/. 2. The `index.html` page from a previous build is shown. 3. Change something on the source for `index.html` (e.g., `index.html.pm`). 4. Refresh the browser. **CURRENT BEHAVIOR** The old `index.html` is shown, as a rebuild is not triggered. **EXPECTED BEHAVIOR** Fetching `/` causes a rebuild and the served page stays up-to-date with the source. Alternatively, do not serve `index.html` on the `/` route—though that is less desirable. The current behavior is a bad middle ground, as it goes against the principle of least surprise.
mbutterick commented 8 years ago (Migrated from github.com)

This is a fair suggestion. I'll see what I can do.

This is a fair suggestion. I'll see what I can do.
leafac commented 8 years ago (Migrated from github.com)

@mbutterick: Thank your for the quick feedback. If I can help, please let me know.

(I am using Pollen and absolutely loving it. Thank you so much for your work.)

@mbutterick: Thank your for the quick feedback. If I can help, please let me know. (I am using Pollen and absolutely **loving** it. Thank you so much for your work.)
mbutterick commented 8 years ago (Migrated from github.com)

You have excellent taste.

You have excellent taste.
mbutterick commented 8 years ago (Migrated from github.com)

The index.html case should now work by default. I also added an index-pages setting to pollen/setup that will let you configure the names of the default pages that the project server will use.

Of course, this is just a convenience within the project server so that /-terminated URLs will do something useful. It does not carry over to raco pollen render, nor a live web server (where the equivalent behavior would be implemented with an .htaccess file).

The `index.html` case should now work by default. I also added an `index-pages` setting to `pollen/setup` that will let you configure the names of the default pages that the project server will use. Of course, this is just a convenience within the project server so that `/`-terminated URLs will do something useful. It does not carry over to `raco pollen render`, nor a live web server (where the equivalent behavior would be implemented with an `.htaccess` file).
leafac commented 8 years ago (Migrated from github.com)

@mbutterick: Thank you very much! 👍

@mbutterick: Thank you very much! 👍
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#123
Loading…
There is no content yet.