Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template roots don't render with initial loads for static exporting, sometimes #73

Closed
arctic-hen7 opened this issue Nov 7, 2021 · 4 comments
Assignees
Labels
A-router Area: router C-bug Category: bug D-medium Difficulty: medium P-high Priority: high S-in-development Status: in development

Comments

@arctic-hen7
Copy link
Member

arctic-hen7 commented Nov 7, 2021

Describe the bug
Right now, perseus export will generate templates that have many pages in a rather strange way (actually quite unintended, just a quirk of the system). Let's say we have a template docs, which has a root page and a ton of other subpages. Those subpages will all be exported into a docs/ folder, which is logical, but the root page won't be at docs/index.html, it'll be at docs.html (outside docs/). Unfortunately, different systems handle this in different ways, though most simply won't find the /docs page. Note that the subsequent loads system works fine because the internal Perseus structure is expected to work like this.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://arctic-hen7.github.io/perseus/en-US/docs/ to see this in production.
    or
  2. Go to https://arctic-hen7.github.io/perseus and click on the Docs link, which will work.

Expected behavior
Template roots should be rendered in the template's folder as index.html for the initial loads system, and such pages should be able to be rendered.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Perseus Version: v0.3.0-beta.17 (affects all versions since exporting was introduced though)
  • Sycamore Version: v0.6
  • OS: Ubuntu
  • Browser: Firefox
  • Browser Version:93

Additional context
Add any other context about the problem here.

@arctic-hen7 arctic-hen7 added C-bug Category: bug A-router Area: router D-easy Difficulty: easy P-high Priority: high S-in-development Status: in development labels Nov 7, 2021
@arctic-hen7 arctic-hen7 self-assigned this Nov 7, 2021
@afidegnum
Copy link
Contributor

i'm facing the same issue, but not with export. i.e links placed in index.html do not render unless i manually specify them in .head()

@arctic-hen7
Copy link
Member Author

That's a very different issue I think. Here, I'm just talking about some pages not rendering properly when exported.

@afidegnum
Copy link
Contributor

ok

@arctic-hen7 arctic-hen7 added D-medium Difficulty: medium and removed D-easy Difficulty: easy labels Nov 11, 2021
@arctic-hen7
Copy link
Member Author

I've fixed this by placing all initial load pages into their own directories when exporting. That shouldn't result in any changes to the vast majority of codebases, and this should improve compatibility with a wider variety of hosting systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-router Area: router C-bug Category: bug D-medium Difficulty: medium P-high Priority: high S-in-development Status: in development
Projects
None yet
Development

No branches or pull requests

2 participants