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: README.md
-53Lines changed: 0 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,59 +127,6 @@ export default {
127
127
128
128
**Campaign Pages**: Enable marketing campaigns to link directly to specific product features or testimonials.
129
129
130
-
## Usage with Astro (Headless)
131
-
132
-
> **⚠️ Current Limitation**: The configuration options described above (like `anchorAttribute`, `anchors: false`, and `anchorDefault`) are not currently passed through to headless frontends like Astro. These options only work in traditional ApostropheCMS projects. We're working on improving this integration.
133
-
134
-
When using ApostropheCMS as a headless CMS with an Astro frontend, you can still implement anchor functionality by manually handling the anchor data in your Astro components. You can also pass options to individual widgets on a per-area basis, but you will have to alter the code examples below to handle these options.
135
-
136
-
### Step 1: Create the WidgetWrapper Component
137
-
138
-
In your Astro frontend, create `components/WidgetWrapper.astro` with the following content:
139
-
140
-
```javascript
141
-
---
142
-
const { widget } =Astro.props;
143
-
144
-
consthasAnchor= widget?.anchorId;
145
-
---
146
-
147
-
{
148
-
hasAnchor ? (
149
-
<div id={widget.anchorId}>
150
-
<slot />
151
-
</div>
152
-
) : (
153
-
<slot />
154
-
)
155
-
}
156
-
```
157
-
158
-
### Step 2: Wrap Your Widget Components
159
-
160
-
Then go to your widget components (e.g., `widgets/ImageWidget.astro`) and wrap their existing content with the WidgetWrapper:
0 commit comments