[PAGES-182] Static renderer for SPA Created: 27/May/19  Updated: 05/Nov/19  Resolved: 30/Jul/19

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicate
duplicates PAGES-207 SPA renderer Closed
duplicates PAGES-208 Provide endpoints serving the templat... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

User story:

As a developer I want to publish my entire SPA build into a Magnolia module, including the index.html page it creates, and use the index.html as a template script, so that I can easily setup the Page Editor to edit the SPA.

Notes:

Frontend frameworks always build a default index.html page which contains the relative links to other files (such as js & css) and sometimes other metadata such as a "base" path. Often the relatively linked files have new names with every build to prevent unwanted caching, and sometimes the js files are split to optimize app loading performance. It can be tiresome and error-prone to transfer the proper information from this file to a regular freemarker template script. Ideally a template definition can point directly to this generated index file and take care of anything else such as providing the functionality that a page directive does.

Acceptance criteria:

  • Developer only needs to provide the path to the index file in their template definition.
  • Developer provides a different template renderer name than freemarker, maybe "static", "headless" or "single-page-app".
  • Developer does not need to add a page directive or any area directives in the file, or change it in any way.

Additional notes:

Possibly the renderer does the following:

  • Loads the specified index.html file.
  • Adds the Magnolia page directive.
  • Set a BaseURL in the page.
  • Write "Mapping configuration" to the page.
  • Write "EditorHints" to the page (when in Page Editor).

Generated at Mon Feb 12 06:16:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.