You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: guides/eleventy.adoc
+52-3
Original file line number
Diff line number
Diff line change
@@ -1644,6 +1644,9 @@ Bookshop's Jekyll live editing is built on top of the liquidjs package. As such,
1644
1644
1645
1645
|Accessing `site.data` and `site.<collection>`
1646
1646
|ℹ️ Iterating through collections and data files should be possible when live editing Bookshop components.
1647
+
1648
+
|Jekyll plugins
1649
+
|❌ — See <<Rendering Different Content When Live Editing>>
1647
1650
|===
1648
1651
1649
1652
++++
@@ -1665,8 +1668,12 @@ Bookshop's Eleventy live editing is built on top of the liquidjs package. As suc
1665
1668
1666
1669
|Filters: `url`
1667
1670
|✅
1671
+
1668
1672
|Accessing `site.data` and `site.<collection>`
1669
1673
|ℹ️ Iterating through collections and data files should be possible when live editing Bookshop components.
1674
+
1675
+
|Eleventy plugins
1676
+
|❌ — See <<Rendering Different Content When Live Editing>>
1670
1677
|===
1671
1678
1672
1679
++++
@@ -1695,6 +1702,8 @@ NOTE: Work is underway to expand support for many of the functions below. Open a
1695
1702
|❌
1696
1703
|===
1697
1704
1705
+
For unsupported functions, see <<Rendering Different Content When Live Editing>>
1706
+
1698
1707
[cols="1,1"]
1699
1708
|===
1700
1709
|Template Function |Supported in Bookshop
@@ -1875,9 +1884,51 @@ NOTE: Work is underway to expand support for many of the functions below. Open a
1875
1884
1876
1885
endif::hugo[]
1877
1886
1887
+
=== Rendering Different Content When Live Editing
1888
+
1889
+
You can render special content in the live editing environment by checking the Bookshop Live Editor flag. This can be useful to show extra information to your editors, or to use a feature that isn't supported while live editing.
1890
+
1891
+
ifdef::hugo[]
1892
+
```go
1893
+
{{ if isset . "env_bookshop_live" }}
1894
+
<p>I am being edited live!</p>
1895
+
<h1>Fallback {{ .my_page }} title</h1>
1896
+
{{ else }}
1897
+
<p>Standard build output</p>
1898
+
<h1>{{ with site.GetPage .my_page }}{{ .Title }}{{ end }}</h1>
1899
+
{{ end }}
1900
+
```
1901
+
endif::hugo[]
1902
+
ifdef::eleventy[]
1903
+
```liquid
1904
+
{% if env_bookshop_live %}
1905
+
<p>I am being edited live!</p>
1906
+
<h1>Fallback Title</h1>
1907
+
{% else %}
1908
+
<p>Standard build output</p>
1909
+
<h1>{% my_plugin %}</h1>
1910
+
{% endif %}
1911
+
```
1912
+
endif::eleventy[]
1913
+
ifdef::jekyll[]
1914
+
```liquid
1915
+
{% if env_bookshop_live %}
1916
+
<p>I am being edited live!</p>
1917
+
<h1>Fallback Title</h1>
1918
+
{% else %}
1919
+
<p>Standard build output</p>
1920
+
<h1>{% my_plugin %}</h1>
1921
+
{% endif %}
1922
+
```
1923
+
endif::jekyll[]
1924
+
1878
1925
=== Disabling Live Editing
1879
1926
1880
-
Some components won't be compatible with live editing, in this case you can disable live editing with on a flag in the component's data. Bookshop will look for any of the following keys:
1927
+
Some components won't be compatible with live editing, in this case you can disable live editing with on a flag in the component's data. This is intended for components such as navigation and footer blocks that aren't connected to live editing. In most scenarios, you should use the templating flags in <<Rendering Different Content When Live Editing>>.
1928
+
1929
+
IMPORTANT: This setting will only apply if the component is rendered directly from a site layout. If this component is within another component, it will still update live (as the parent re-rendering will encapsulate it).
1930
+
1931
+
Bookshop will look for any of the following keys on a **top-level** component:
1881
1932
1882
1933
* live_render
1883
1934
* liveRender
@@ -1919,8 +1970,6 @@ If you have a specific component that you never want to live edit, you can set `
1919
1970
1920
1971
NOTE: Since the blueprint only affects the creation of new components, you will need to add the `_live_render` flag to any existing component data in your front matter.
1921
1972
1922
-
IMPORTANT: This flag will only apply if the component is rendered directly from a site layout. If this component is within another component, it will still update live (as the parent re-rendering will encapsulate it).
Copy file name to clipboardexpand all lines: guides/hugo.adoc
+52-3
Original file line number
Diff line number
Diff line change
@@ -1644,6 +1644,9 @@ Bookshop's Jekyll live editing is built on top of the liquidjs package. As such,
1644
1644
1645
1645
|Accessing `site.data` and `site.<collection>`
1646
1646
|ℹ️ Iterating through collections and data files should be possible when live editing Bookshop components.
1647
+
1648
+
|Jekyll plugins
1649
+
|❌ — See <<Rendering Different Content When Live Editing>>
1647
1650
|===
1648
1651
1649
1652
++++
@@ -1665,8 +1668,12 @@ Bookshop's Eleventy live editing is built on top of the liquidjs package. As suc
1665
1668
1666
1669
|Filters: `url`
1667
1670
|✅
1671
+
1668
1672
|Accessing `site.data` and `site.<collection>`
1669
1673
|ℹ️ Iterating through collections and data files should be possible when live editing Bookshop components.
1674
+
1675
+
|Eleventy plugins
1676
+
|❌ — See <<Rendering Different Content When Live Editing>>
1670
1677
|===
1671
1678
1672
1679
++++
@@ -1695,6 +1702,8 @@ NOTE: Work is underway to expand support for many of the functions below. Open a
1695
1702
|❌
1696
1703
|===
1697
1704
1705
+
For unsupported functions, see <<Rendering Different Content When Live Editing>>
1706
+
1698
1707
[cols="1,1"]
1699
1708
|===
1700
1709
|Template Function |Supported in Bookshop
@@ -1875,9 +1884,51 @@ NOTE: Work is underway to expand support for many of the functions below. Open a
1875
1884
1876
1885
endif::hugo[]
1877
1886
1887
+
=== Rendering Different Content When Live Editing
1888
+
1889
+
You can render special content in the live editing environment by checking the Bookshop Live Editor flag. This can be useful to show extra information to your editors, or to use a feature that isn't supported while live editing.
1890
+
1891
+
ifdef::hugo[]
1892
+
```go
1893
+
{{ if isset . "env_bookshop_live" }}
1894
+
<p>I am being edited live!</p>
1895
+
<h1>Fallback {{ .my_page }} title</h1>
1896
+
{{ else }}
1897
+
<p>Standard build output</p>
1898
+
<h1>{{ with site.GetPage .my_page }}{{ .Title }}{{ end }}</h1>
1899
+
{{ end }}
1900
+
```
1901
+
endif::hugo[]
1902
+
ifdef::eleventy[]
1903
+
```liquid
1904
+
{% if env_bookshop_live %}
1905
+
<p>I am being edited live!</p>
1906
+
<h1>Fallback Title</h1>
1907
+
{% else %}
1908
+
<p>Standard build output</p>
1909
+
<h1>{% my_plugin %}</h1>
1910
+
{% endif %}
1911
+
```
1912
+
endif::eleventy[]
1913
+
ifdef::jekyll[]
1914
+
```liquid
1915
+
{% if env_bookshop_live %}
1916
+
<p>I am being edited live!</p>
1917
+
<h1>Fallback Title</h1>
1918
+
{% else %}
1919
+
<p>Standard build output</p>
1920
+
<h1>{% my_plugin %}</h1>
1921
+
{% endif %}
1922
+
```
1923
+
endif::jekyll[]
1924
+
1878
1925
=== Disabling Live Editing
1879
1926
1880
-
Some components won't be compatible with live editing, in this case you can disable live editing with on a flag in the component's data. Bookshop will look for any of the following keys:
1927
+
Some components won't be compatible with live editing, in this case you can disable live editing with on a flag in the component's data. This is intended for components such as navigation and footer blocks that aren't connected to live editing. In most scenarios, you should use the templating flags in <<Rendering Different Content When Live Editing>>.
1928
+
1929
+
IMPORTANT: This setting will only apply if the component is rendered directly from a site layout. If this component is within another component, it will still update live (as the parent re-rendering will encapsulate it).
1930
+
1931
+
Bookshop will look for any of the following keys on a **top-level** component:
1881
1932
1882
1933
* live_render
1883
1934
* liveRender
@@ -1919,8 +1970,6 @@ If you have a specific component that you never want to live edit, you can set `
1919
1970
1920
1971
NOTE: Since the blueprint only affects the creation of new components, you will need to add the `_live_render` flag to any existing component data in your front matter.
1921
1972
1922
-
IMPORTANT: This flag will only apply if the component is rendered directly from a site layout. If this component is within another component, it will still update live (as the parent re-rendering will encapsulate it).
Copy file name to clipboardexpand all lines: guides/jekyll.adoc
+52-3
Original file line number
Diff line number
Diff line change
@@ -1644,6 +1644,9 @@ Bookshop's Jekyll live editing is built on top of the liquidjs package. As such,
1644
1644
1645
1645
|Accessing `site.data` and `site.<collection>`
1646
1646
|ℹ️ Iterating through collections and data files should be possible when live editing Bookshop components.
1647
+
1648
+
|Jekyll plugins
1649
+
|❌ — See <<Rendering Different Content When Live Editing>>
1647
1650
|===
1648
1651
1649
1652
++++
@@ -1665,8 +1668,12 @@ Bookshop's Eleventy live editing is built on top of the liquidjs package. As suc
1665
1668
1666
1669
|Filters: `url`
1667
1670
|✅
1671
+
1668
1672
|Accessing `site.data` and `site.<collection>`
1669
1673
|ℹ️ Iterating through collections and data files should be possible when live editing Bookshop components.
1674
+
1675
+
|Eleventy plugins
1676
+
|❌ — See <<Rendering Different Content When Live Editing>>
1670
1677
|===
1671
1678
1672
1679
++++
@@ -1695,6 +1702,8 @@ NOTE: Work is underway to expand support for many of the functions below. Open a
1695
1702
|❌
1696
1703
|===
1697
1704
1705
+
For unsupported functions, see <<Rendering Different Content When Live Editing>>
1706
+
1698
1707
[cols="1,1"]
1699
1708
|===
1700
1709
|Template Function |Supported in Bookshop
@@ -1875,9 +1884,51 @@ NOTE: Work is underway to expand support for many of the functions below. Open a
1875
1884
1876
1885
endif::hugo[]
1877
1886
1887
+
=== Rendering Different Content When Live Editing
1888
+
1889
+
You can render special content in the live editing environment by checking the Bookshop Live Editor flag. This can be useful to show extra information to your editors, or to use a feature that isn't supported while live editing.
1890
+
1891
+
ifdef::hugo[]
1892
+
```go
1893
+
{{ if isset . "env_bookshop_live" }}
1894
+
<p>I am being edited live!</p>
1895
+
<h1>Fallback {{ .my_page }} title</h1>
1896
+
{{ else }}
1897
+
<p>Standard build output</p>
1898
+
<h1>{{ with site.GetPage .my_page }}{{ .Title }}{{ end }}</h1>
1899
+
{{ end }}
1900
+
```
1901
+
endif::hugo[]
1902
+
ifdef::eleventy[]
1903
+
```liquid
1904
+
{% if env_bookshop_live %}
1905
+
<p>I am being edited live!</p>
1906
+
<h1>Fallback Title</h1>
1907
+
{% else %}
1908
+
<p>Standard build output</p>
1909
+
<h1>{% my_plugin %}</h1>
1910
+
{% endif %}
1911
+
```
1912
+
endif::eleventy[]
1913
+
ifdef::jekyll[]
1914
+
```liquid
1915
+
{% if env_bookshop_live %}
1916
+
<p>I am being edited live!</p>
1917
+
<h1>Fallback Title</h1>
1918
+
{% else %}
1919
+
<p>Standard build output</p>
1920
+
<h1>{% my_plugin %}</h1>
1921
+
{% endif %}
1922
+
```
1923
+
endif::jekyll[]
1924
+
1878
1925
=== Disabling Live Editing
1879
1926
1880
-
Some components won't be compatible with live editing, in this case you can disable live editing with on a flag in the component's data. Bookshop will look for any of the following keys:
1927
+
Some components won't be compatible with live editing, in this case you can disable live editing with on a flag in the component's data. This is intended for components such as navigation and footer blocks that aren't connected to live editing. In most scenarios, you should use the templating flags in <<Rendering Different Content When Live Editing>>.
1928
+
1929
+
IMPORTANT: This setting will only apply if the component is rendered directly from a site layout. If this component is within another component, it will still update live (as the parent re-rendering will encapsulate it).
1930
+
1931
+
Bookshop will look for any of the following keys on a **top-level** component:
1881
1932
1882
1933
* live_render
1883
1934
* liveRender
@@ -1919,8 +1970,6 @@ If you have a specific component that you never want to live edit, you can set `
1919
1970
1920
1971
NOTE: Since the blueprint only affects the creation of new components, you will need to add the `_live_render` flag to any existing component data in your front matter.
1921
1972
1922
-
IMPORTANT: This flag will only apply if the component is rendered directly from a site layout. If this component is within another component, it will still update live (as the parent re-rendering will encapsulate it).
Copy file name to clipboardexpand all lines: javascript-modules/integration-tests/features/eleventy/live_editing/eleventy_bookshop_live_granules.feature
0 commit comments