Skip to content

Commit e1f1f17

Browse files
Merge pull request #3121 from vuestorefront/v2
chore: automatic sync v2->v2-develop
2 parents dde9387 + c33e26d commit e1f1f17

File tree

5 files changed

+4601
-4928
lines changed

5 files changed

+4601
-4928
lines changed

apps/docs/components/content/1.index.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ layout: fullscreen
66
Fast, accessible, and fully customizable components built for e-commerce.
77
::
88

9-
::div{class="my-8 mb-16 flex gap-4 [&>a]:inline not-prose"}
9+
::div{class="my-8 mb-16 flex gap-4 [&>a]:inline not-prose flex-wrap"}
1010
:::docs-button{to="/getting-started/vue"}
1111
Install for Vue
1212
:::
@@ -16,8 +16,12 @@ Install for React
1616
:::docs-button{to="https://qwik-storefront-ui.pages.dev" class="dark:bg-[#AC7EF4] !bg-[#AC7EF4]"}
1717
Install for Qwik
1818
:::
19+
:::docs-button{to="/figma" class="dark:bg-neutral-600 !bg-neutral-500"}
20+
Open Figma file
21+
:::
1922
::
2023

24+
2125
## Base Components
2226

2327
Beautiful, fast, and fully accessible components that integrate with Tailwind CSS to help you quickly build more complex structures.

apps/docs/components/nuxt.config.ts

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default defineNuxtConfig({
44
extends: ['sf-docs-base'],
55
app: {
66
baseURL: process.env.VITE_DOCS_BASEPATH ?? '',
7+
78
head: {
89
link: [
910
{
@@ -13,6 +14,12 @@ export default defineNuxtConfig({
1314
],
1415
},
1516
},
17+
robots: {
18+
enabled: false
19+
},
20+
sitemap: {
21+
enabled: false
22+
},
1623
// fix via https://github.com/nuxt/content/issues/2254
1724
alias: {
1825
'micromark/lib/preprocess.js': 'micromark',

apps/docs/components/package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@microsoft/api-documenter": "^7.13.30",
1717
"@microsoft/api-extractor": "7.18.1",
1818
"@types/node": "^20.12.7",
19-
"nuxt": "^3.6.2",
19+
"nuxt": "^3.9.0",
2020
"nuxt-gtag": "^0.5.7"
2121
},
2222
"dependencies": {
@@ -25,7 +25,8 @@
2525
"@nuxt/content": "^2.12.1",
2626
"@nuxtjs/algolia": "^1.8.0",
2727
"@nuxtjs/color-mode": "^3.2.0",
28-
"@nuxtjs/tailwindcss": "^6.12.0",
28+
"@nuxtjs/seo": "^2.0.0-rc.10",
29+
"@nuxtjs/tailwindcss": "^6.7.0",
2930
"@storefront-ui/typography": "^2.6.0",
3031
"@storefront-ui/vue": "^2.6.2",
3132
"@tailwindcss/typography": "^0.5.9",
@@ -37,9 +38,10 @@
3738
"nuxt-gtag": "^0.5.7",
3839
"nuxt-icon": "^0.3.3",
3940
"nuxt-seo-kit": "^1.3.7",
40-
"sf-docs-base": "1.2.2",
41+
"sf-docs-base": "^1.2.4",
42+
"unstorage": "^1.10.1",
4143
"vite-svg-loader": "^4.0.0",
42-
"vue": "3.4.8"
44+
"vue": "^3.4.23"
4345
},
4446
"resolutions": {
4547
"@storefront-ui/eslint-config": "workspace:*",

apps/docs/components/server/plugins/code-snippets.ts

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { createResolver } from '@nuxt/kit';
1+
import { resolve, relative } from 'pathe';
22
import * as fs from 'node:fs';
3-
import * as path from 'node:path';
43

54
export default defineNitroPlugin((nitro: any) => {
65
// will be configurable in the future
76
const defaultPrefix = '<<<';
8-
const resolver = createResolver(import.meta.url);
7+
98
nitro.hooks.hook('content:file:beforeParse', (file: any) => {
109
if (file._id.endsWith('.md')) {
1110
const snippetMatch = file.body.match(new RegExp(`^${defaultPrefix}(?:\\s*)([^{\\s]+)`, 'gm'));
@@ -21,16 +20,8 @@ export default defineNitroPlugin((nitro: any) => {
2120
const normalizedSrc = filename.replace(/@/g, '.');
2221
const nameExt = normalizedSrc.split('.').pop().toLowerCase();
2322

24-
let filePath = resolver.resolve(normalizedSrc);
25-
if (import.meta.env.NODE_ENV === 'prerender') {
26-
filePath = path.join(path.dirname(import.meta.url), '..', '..', '..', '..', filePath).replace('file:/', '/');
27-
if (!fs.existsSync(filePath)) {
28-
filePath = path
29-
.join(path.dirname(import.meta.url), '..', '..', '..', '..', '..', resolver.resolve(normalizedSrc))
30-
.replace('file:/', '/');
31-
}
32-
}
33-
23+
let filePath = resolve(resolve(), normalizedSrc.replace('../../../../', '../../'))
24+
3425
const isAFile = fs.existsSync(filePath);
3526
const escapedSnippet = snippet.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
3627

0 commit comments

Comments
 (0)