Skip to content

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

@ogizanagi

Description

@ogizanagi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions