netlogix/esi-rendering

Last activity on 6 June 2021
  • 102
composer require netlogix/esi-rendering

Render content in fusion as esi:include

1.2.1

Render content in fusion as esi:include

Version
1.2.1
Type
neos-package
Release Date
15.06.2021 16:13:08
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
  • flowpack/varnish: For Varnish support including caching ESIs individually with their own lifetime
Provides
None
Conflicts
None
Replaces
None
MIT
  • #esi
  • #varnish
  • #neos
  • #nginx
fea65504f0f3dcaccf3395d34eb94ba9db5c5c74

Netlogix.EsiRendering

This package provides a simple way to render edge side includes in Neos. This alows you to individually cache parts of the page (e.g. header/footer).

We recommend using this package together with flowpack/varnish for Varnish integration.

Install package

composer require netlogix/esi-rendering

Usage

To render a fusion path as ESI, you can use the Netlogix.EsiRendering:RenderAsEsi Fusion implementation:

renderer = afx`
    <p>This is rendered outside of the esi</p>
    
    <Netlogix.EsiRendering:RenderAsEsi node={props.site} cacheIdentifier="my-esi">
        <p>This is rendered inside of the esi</p>
        
        <p>The given node is available as {node}</p>
    </Netlogix.EsiRendering:RenderAsEsi>
`

This will render a <esi:include src="https://raw.githubusercontent.com/netlogix/Netlogix.EsiRendering/master/..."> tag after the first <p>.

ESIs are not used in the Neos backend, instead the content will be rendered directly.

Debugging

To get the ESI uri, you can set the following setting to true:

Netlogix:
  EsiRendering:
    debug: true

This will render a link before the ESI:

<link rel="esi:include" esi-identifier="my-esi" context-node="/sites/my-site@live" href="/esirendering?fusionPath=...">

This is enabled by default for the Development context.

The content of the readme is provided by Github
The same vendor provides 20 package(s).