Skip to content

Commit 8247720

Browse files
committed
chore(docs): update landing page
Signed-off-by: Frederik Bußmann <frederik@bussmann.io>
1 parent 76394ad commit 8247720

2 files changed

Lines changed: 153 additions & 2 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<template>
2+
<div class="h-86 flex flex-col justify-center">
3+
<div>
4+
<p class="text-2xl font-bold text-center mb-12">
5+
Welcome, Nuxt User!
6+
</p>
7+
8+
<UButton
9+
class="mb-6 py-3 font-bold w-full justify-center items-center"
10+
icon="i-lucide-package-2"
11+
>
12+
View Orders
13+
</UButton>
14+
15+
<UButton
16+
class="mb-6 py-3 font-bold w-full justify-center items-center"
17+
variant="soft"
18+
icon="i-lucide-map-pin-house"
19+
>
20+
Edit Address
21+
</UButton>
22+
23+
<UButton
24+
class="py-3 font-bold w-full justify-center items-center"
25+
variant="outline"
26+
icon="i-lucide-log-out"
27+
>
28+
Log out
29+
</UButton>
30+
</div>
31+
</div>
32+
</template>

docs/content/index.md

Lines changed: 121 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,113 @@ ProductImage.vue
117117
:::
118118
::
119119

120+
::component-hero
121+
---
122+
title: Customer Account API without the hassle
123+
---
124+
125+
#component
126+
::customer-account
127+
::
128+
129+
#component-title
130+
CustomerAccount.vue
131+
132+
#default
133+
:::code-tree{default-value="app/components/CustomerAccount.vue"}
134+
```vue [app/components/CustomerAccount.vue]
135+
<script setup lang="ts">
136+
const { isLoggedIn } = useUserSession()
137+
138+
if (!isLoggedIn.value) {
139+
navigateTo('/_auth/customer-account/callback')
140+
}
141+
142+
const { data: customer } = await useCustomerAccountData(`#graphql
143+
query GetCustomer {
144+
customer {
145+
firstName
146+
lastName
147+
}
148+
}
149+
`, {
150+
transform: data => data?.customer,
151+
})
152+
</script>
153+
154+
<template>
155+
<div v-if="customer">
156+
<h1>
157+
Welcome, {{ customer.firstName }} {{ customer.lastName }}!
158+
</h1>
159+
160+
<UButton
161+
to="/account/orders"
162+
icon="i-lucide-package-2"
163+
>
164+
View Orders
165+
</UButton>
166+
167+
<UButton
168+
to="/account/settings/address"
169+
variant="soft"
170+
icon="i-lucide-map-pin-house"
171+
>
172+
Edit Address
173+
</UButton>
174+
175+
<UButton
176+
to="/_auth/customer-account/logout"
177+
variant="outline"
178+
icon="i-lucide-log-out"
179+
>
180+
Log out
181+
</UButton>
182+
</div>
183+
</template>
184+
```
185+
186+
```ts [nuxt.config.ts]
187+
export default defineNuxtConfig({
188+
modules: ['@nuxtjs/shopify'],
189+
190+
shopify: {
191+
name: 'store-name',
192+
193+
clients: {
194+
customerAccount: {
195+
apiVersion: '2026-01',
196+
clientId: 'your-client-id',
197+
},
198+
},
199+
},
200+
})
201+
```
202+
203+
```json [package.json]
204+
{
205+
"name": "nuxt-shopify-store",
206+
"private": true,
207+
"type": "module",
208+
"scripts": {
209+
"dev": "nuxt dev",
210+
"build": "nuxt build",
211+
"generate": "nuxt generate",
212+
"preview": "nuxt preview"
213+
},
214+
"dependencies": {
215+
"@nuxtjs/shopify": "latest",
216+
"nuxt": "latest",
217+
"nuxt-auth-utils": "latest"
218+
},
219+
"devDependencies": {
220+
"@shopify/hydrogen": "2026.4.0"
221+
}
222+
}
223+
```
224+
:::
225+
::
226+
120227
::component-hero
121228
---
122229
title: Easy integration with the Admin API
@@ -210,7 +317,7 @@ Markets.vue
210317
"dependencies": {
211318
"@nuxtjs/shopify": "latest",
212319
"nuxt": "latest"
213-
}
320+
},
214321
}
215322
```
216323
:::
@@ -246,6 +353,18 @@ Build your Shopify store with Nuxt
246353
Access products, collections, customers, and more with the Shopify Storefront API. Perfect for building custom shopping experiences.
247354
:::
248355

356+
:::u-page-feature
357+
---
358+
icon: i-lucide-user
359+
to: /essentials/customer-account
360+
---
361+
#title
362+
Easy [Customer Account API]{.text-primary} Integration
363+
364+
#description
365+
Built-in authentication flow and access management for the Shopify Customer Account API. Zero-boilerplate customer data and sessions.
366+
:::
367+
249368
:::u-page-feature
250369
---
251370
icon: i-lucide-shield
@@ -267,7 +386,7 @@ Build your Shopify store with Nuxt
267386
Zero-config [Code Generation]{.text-primary}
268387

269388
#description
270-
Generates and hot-reloads TypeScript types from your GraphQL operations, for reliable typing and autocompletion.
389+
Generates and hot-reloads TypeScript types from your GraphQL operations, for reliable typing and autocompletion. No setup required.
271390
:::
272391

273392
:::u-page-feature

0 commit comments

Comments
 (0)