adhocteam / pushup

Pushup is for making modern, page-oriented web apps in Go
https://pushup.adhoc.dev
MIT License
840 stars 30 forks source link

index pages in subdirs don't work #30

Closed llimllib closed 1 year ago

llimllib commented 1 year ago
  1. Create a page at app/test/index.pushup
  2. Try to visit the /test/ URL, expecting the page to render
  3. note that it doesn't work

When there's an index.pushup file in a subdirectory, pushup should serve that page at the root of the subdirectory

paulsmith commented 1 year ago

Does /test (no trailing slash) work?

paulsmith commented 1 year ago

Also - it needs to be app/pages/test/index.pushup (pages dir is critical)

paulsmith commented 1 year ago

I could not reproduce, but in any case, it surfaced the /test/ issue (trailing slash) which is fixed by 060cceb.

llimllib commented 1 year ago

the missing pages was just a typo - 060cceb fixes the issue. I didn't even think to try without the slash

paulsmith commented 1 year ago

It's an open question. Should trailing slash be the default (like Django)? Or not (the way it currently is)? I used to prefer the Django style but lately mildly prefer no trailing slash. Will open separate issue.