naltatis / micro-frontends-in-action-code

The Tractor Store - sample code from the book Micro Frontends in Action
https://the-tractor.store
MIT License
409 stars 155 forks source link

Podium demo - Use document template #1

Closed trygve-lie closed 4 years ago

trygve-lie commented 4 years ago

Podium has a concept of a document template. A document template is normally the markup which encapsulates a podlet and a layout and looks something like this:

<html>
  <head><title>My title</title></head>
  <body>
    <!-- Podlet / layout content goes here -->
  </body>
</html>

This concept is there to help development of Podlets withing the same constraints as it will be included in in a Layout.

Lets say that in an organization all pages should have a CSS class on the <body> tag. Then all Layouts should have this and one would also like to have this in development when developing Podlets.

With this document template concept one can then make a node.js module which contains a such a document where the <body> tag has such a CSS class. All Layouts and Podlets in an organization can then include this module as a dependency to their project and they will all be withing the constraints of this document template.

Podium does ship with a basic document template. This PR makes use of this default document template.

naltatis commented 4 years ago

Hi Trygve, I've reworked the Podium example. Could you have another look at them?

naltatis commented 4 years ago

Closing this PR because I already updated the examples earlier.