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

Allow to provide an entrypoint URL to the build command #167

Open
ogizanagi opened this issue Feb 22, 2023 · 0 comments
Open

Allow to provide an entrypoint URL to the build command #167

ogizanagi opened this issue Feb 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ogizanagi
Copy link
Member

ogizanagi commented Feb 22, 2023

Instead of scanning all the GET routes available in the app without parameters to crawl the pages,
allow to provide a single entrypoint URL from where to start crawling the pages.

symfony console stenope:build --entrypoint-url=/catalogs build/catalogs
symfony console stenope:build --entrypoint-url=/kiosks build/kiosk

This would allow:

  • building multiples, distinct sections of a single Symfony app into multiple dedicated static builds
  • naturally ignore some of the existing GET routes that are not meant to be included in the static build

Additionnal needs:

  • we might need a way to register some additional routes that are not referenced on any page, but should still be included.
    ➜ To solve such a need, we currently can register a listener on the stenope:build command to add such routes, as we do for member signatures pages on our elao website: https://github.com/Elao/elao_/blob/master/src/Stenope/Listener/BuildListener.php
    But we might need a more official way and allow the user to choose if it should be included or not according to the entrypoint. ➜ Simply create a dedicated event where one could access the entrypoint and add routes to the collection?
    One could also simply rely on an env var as a flag when calling the build command.
@ogizanagi ogizanagi added the enhancement New feature or request label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant