Skip to content

Commit 7000207

Browse files
committed
bring back snippets docs for global header and footer app snippets
1 parent c03bc9a commit 7000207

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:::tip
2+
To see a full example of the features available with App Snippets, Assets, and Settings, take a look at the Google Tag Manager app on Github.
3+
[View Google Tag Manager App on Github](https://github.com/29next/google-tag-manager)
4+
:::

docs/apps/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ We have full featured open source example apps that provide full code examples f
2525
| Example Apps | Description | Link |
2626
| ------ | ------ | ----- |
2727
| Example S2S App | Server to Server demonstration of [OAuth Flow](/apps/oauth/index.md), [Session Tokens](/apps/oauth/session-auth.md), [Remote Settings](/apps/settings.md), [Webhook Setup](/webhooks.md) and [Verification](/webhooks.md#verifying-webhook-requests) | [View](https://github.com/29next/example-app) |
28-
| Google Analytics 4 | Demonstrates [Event Tracking](/docs/apps/event-tracking.md) to add javascript events to storefronts. | [View](https://github.com/29next/google-analytics-4) |
28+
| Google Analytics 4 | Demonstrates [Snippets](/docs/apps/snippets.md) and [Event Tracking](/docs/apps/event-tracking.md) to add javascript events to storefronts. | [View](https://github.com/29next/google-analytics-4) |
2929
| Fulfillment Service App | Demonstrates demonstration of [OAuth Flow](/apps/oauth/index.md) and the [Fulfillment Flow](/docs/apps/guides/fulfillment-service/#fulfillment-flow-overview) using the [Fulfillment APIs](/docs/api/admin/reference/#tag/fulfillment). | [View](https://github.com/29next/demo-fulfillment-service-app) |
3030

3131

docs/apps/snippets.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
sidebar_label: Snippets
3+
sidebar_position: 5
4+
---
5+
# App Snippets
6+
7+
App Snippets are HTML template files used to extend Storefront Themes.
8+
9+
Snippets follow the same syntax and features of [theme templates](/docs/storefront/themes/templates/index.md) which bring a full suite of tools and context available to app developers to leverage when adding custom features to a storefront.
10+
11+
```mdx-code-block
12+
13+
import GoogleTagManager from '@site/_snippets/_view-google-tag-manager.mdx';
14+
15+
<GoogleTagManager />
16+
17+
```
18+
19+
### Locations
20+
21+
Theme's on the 29 Next platform support `app_hooks` which are locations within storefront themes your app can target to include your snippets without needing the customize the theme itself.
22+
23+
:::info
24+
To upload your snippets and manifest.json, install [App Kit](/docs/apps/app-kit.md) to zip your snippet files and push them to 29 Next.
25+
:::
26+
27+
```mdx-code-block
28+
29+
import AppHookLocations from '@site/_snippets/_app-hook-locations.mdx';
30+
31+
<AppHookLocations />
32+
33+
```
34+
35+
36+
### Snippet Usage Example
37+
38+
```mdx-code-block
39+
40+
import AppUsageExample from '@site/_snippets/_app-usage-example.mdx';
41+
42+
<AppUsageExample />
43+
44+
```

0 commit comments

Comments
 (0)