Skip to content

Commit

Permalink
Merge branch 'main' into DX-meteor
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanrajh committed Mar 21, 2024
2 parents 7b66f85 + ab1deec commit 6c35b61
Show file tree
Hide file tree
Showing 8 changed files with 1,736 additions and 1,675 deletions.
26 changes: 13 additions & 13 deletions .github/scripts/embed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ set -e

# custom config
BRANCH_DOCS=main
BRANCH_DOCS_66=next-6.6
BRANCH_DOCS_65=v6.5
BRANCH_DOCS_64=v6.4
BRANCH_DOCS_63=v6.3.0
BRANCH_FRONTENDS=DX-devhub
BRANCH_ADMIN_EXTENSION_SDK=DX-223
BRANCH_ADMIN_EXTENSION_SDK=dx-devhub-admin-sdk
BRANCH_METEOR_ICON_KIT=dx/devhub-icon-kit
BRANCH_METEOR_COMPONENT_LIBRARY=DX-231
BRANCH_RELEASE_NOTES=main

# custom orgs
ORG_DOCS=shopware
ORG_DOCS_66=shopware
ORG_DOCS_65=shopware
ORG_DOCS_64=shopware
ORG_DOCS_63=shopware
ORG_FRONTENDS=shopware
Expand Down Expand Up @@ -42,10 +42,10 @@ fi
./docs-cli.cjs clone \
--ci \
--repository shopware/docs \
--branch ${BRANCH_DOCS_66:-main} \
--branch ${BRANCH_DOCS_65:-main} \
--src . \
--dst docs/v6.6rc \
--org ${ORG_DOCS_66:-shopware}
--dst docs/v6.5 \
--org ${ORG_DOCS_65:-shopware}

./docs-cli.cjs clone \
--ci \
Expand Down Expand Up @@ -82,13 +82,13 @@ fi
# --dst frontends-gl \
# --git gitlab.shopware.com

#./docs-cli.cjs clone \
# --ci \
# --repository shopware/admin-extension-sdk \
# --branch ${BRANCH_ADMIN_EXTENSION_SDK:-main} \
# --src docs/docs/guide \
# --dst resources/admin-extension-sdk \
# --org ${ORG_ADMIN_EXTENSION_SDK:-shopware}
./docs-cli.cjs clone \
--ci \
--repository shopware/meteor \
--branch ${BRANCH_ADMIN_EXTENSION_SDK:-main} \
--src packages/admin-sdk/docs \
--dst resources/admin-extension-sdk \
--org ${ORG_ADMIN_EXTENSION_SDK:-shopware}

./docs-cli.cjs clone \
--ci \
Expand Down
78 changes: 45 additions & 33 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ import ViteRequireContext from '@originjs/vite-plugin-require-context'
import {resolve} from "path";
import fs from 'fs';

import { MarkdownTransform } from "../node_modules/@shopware-docs/vitepress/src/plugins/markdownTransform";
import { CssCleanup, baseCleanup } from "../node_modules/@shopware-docs/vitepress/src/plugins/cssCleanup";
import { CssCleanup, baseCleanup, MarkdownTransform, copyAdditionalAssets, createSitemap, storeRedirects, addOGImage, userCentricsHead, generateMarkdownFromStoplight, getStoplightUrls } from "@shopware-docs/vitepress";
import Inspect from "vite-plugin-inspect";
import liveReload from 'vite-plugin-live-reload'
import { withMermaid } from "vitepress-plugin-mermaid";
import topLevelAwait from "vite-plugin-top-level-await";
//import { TsFunctionDescription, TsFunctionsList } from "@shopware-pwa/typer";
import { TsFunctionDescription, TsFunctionsList } from "@shopware-docs/typer";

import {copyAdditionalAssets, createSitemap, storeRedirects, addOGImage, userCentricsHead} from "../node_modules/@shopware-docs/vitepress/src/helpers";
import {generateMarkdownFromStoplight, getStoplightUrls} from "./helpers/stoplight";
import navigation from "./navigation";

import {
Expand All @@ -39,7 +35,7 @@ const sections: SwagSectionsConfig[] = [
matches: [
'/apps/',
'/docs/guides/plugins/apps/',
'/docs/v6.6rc/guides/plugins/apps/',
'/docs/v6.5/guides/plugins/apps/',
'/docs/v6.4/guides/plugins/apps/',
'/docs/v6.3/guides/plugins/apps/',
],
Expand All @@ -49,7 +45,7 @@ const sections: SwagSectionsConfig[] = [
matches: [
'/themes/',
'/docs/guides/plugins/themes/',
'/docs/v6.6rc/guides/plugins/themes/',
'/docs/v6.5/guides/plugins/themes/',
'/docs/v6.4/guides/plugins/themes/',
'/docs/v6.3/guides/plugins/themes/',
],
Expand All @@ -59,7 +55,7 @@ const sections: SwagSectionsConfig[] = [
matches: [
'/plugins/',
'/docs/guides/plugins/plugins/',
'/docs/v6.6rc/guides/plugins/plugins/',
'/docs/v6.5/guides/plugins/plugins/',
'/docs/v6.4/guides/plugins/plugins/',
'/docs/v6.3/guides/plugins/plugins/',
],
Expand All @@ -74,7 +70,7 @@ const sections: SwagSectionsConfig[] = [
title: 'Concepts',
matches: [
'/docs/concepts/',
'/docs/v6.6rc/concepts/',
'/docs/v6.5/concepts/',
'/docs/v6.4/concepts/',
'/docs/v6.3/concepts/',
],
Expand All @@ -83,7 +79,7 @@ const sections: SwagSectionsConfig[] = [
title: 'Guides',
matches: [
'/docs/guides/',
'/docs/v6.6rc/guides/',
'/docs/v6.5/guides/',
'/docs/v6.4/guides/',
'/docs/v6.3/guides/',
],
Expand All @@ -92,7 +88,7 @@ const sections: SwagSectionsConfig[] = [
title: 'Products',
matches: [
'/docs/products/',
'/docs/v6.6rc/products/',
'/docs/v6.5/products/',
'/docs/v6.4/products/',
'/docs/v6.3/products/',
],
Expand All @@ -101,11 +97,29 @@ const sections: SwagSectionsConfig[] = [
title: 'Resources',
matches: [
'/docs/resources/',
'/docs/v6.6rc/resources/',
'/docs/v6.5/resources/',
'/docs/v6.4/resources/',
'/docs/v6.3/resources/',
],
},
{
title: 'Meteor Admin SDK',
matches: [
'/resources/admin-extension-sdk/',
],
},
{
title: 'Meteor Icon Kit',
matches: [
'/resources/meteor-icon-kit/',
],
},
{
title: 'Release notes',
matches: [
'/release-notes/',
],
},
{
title: 'General',
matches: [
Expand All @@ -118,7 +132,7 @@ const embeds: SwagEmbedsConfig[] = [
{
repository: 'docs',
points: {
'/docs/v6.6rc/': 'next-6.6',
'/docs/v6.5/': 'v6.5',
'/docs/v6.4/': 'v6.4',
'/docs/v6.3/': 'v6.3.0',
'/docs/': 'main',
Expand All @@ -133,11 +147,11 @@ const embeds: SwagEmbedsConfig[] = [
folder: 'app/docs/docs'
},
{
repository: 'admin-extension-sdk',
repository: 'meteor',
points: {
'/resources/admin-extension-sdk/': 'main',
},
folder: 'docs',
folder: 'packages/admin-sdk/docs',
},
{
repository: 'meteor-component-library',
Expand Down Expand Up @@ -191,10 +205,8 @@ export default withMermaid(defineConfigWithTheme<ThemeConfig>({
"docs/resources/references/adr/YYYY-MM-DD-template.md",
// snippets
'docs/snippets/**',
'docs/v6.6rc/snippets/**',
'docs/v6.5/snippets/**',
// readmes
'docs/README.md',
'docs/v6.6rc/README.md',
'**/README.md',
],

Expand Down Expand Up @@ -222,7 +234,7 @@ export default withMermaid(defineConfigWithTheme<ThemeConfig>({
usercentrics: process.env.USERCENTRICS,
rollbar: '9ce3bcf057214c7499eefa8865b981e1',
hotjar: '3527584',
gtm: 'G-9JLJ6GGB76',
gtm: 'WJKMNPS',
}),

// search console
Expand Down Expand Up @@ -260,31 +272,31 @@ export default withMermaid(defineConfigWithTheme<ThemeConfig>({
filter: {
'default': {
exclude: [
'docs/v6.6rc/',
'docs/v6.5/',
'docs/v6.4/',
'docs/v6.3/',
],
},
'/docs/v6.6rc/': {
'/docs/': {
exclude: [
'docs/',
'docs/v6.5/',
'docs/v6.4/',
'docs/v6.3/',
],
include: [
'docs/v6.6rc/',
]
},
'/docs/': {
'/docs/v6.5/': {
exclude: [
'docs/v6.6rc/',
'docs/',
'docs/v6.4/',
'docs/v6.3/',
],
include: [
'docs/v6.5/',
]
},
'/docs/v6.4/': {
exclude: [
'docs/v6.6rc/',
'docs/v6.5/',
'docs/',
'docs/v6.3/',
],
Expand All @@ -294,7 +306,7 @@ export default withMermaid(defineConfigWithTheme<ThemeConfig>({
},
'/docs/v6.3/': {
exclude: [
'docs/v6.6rc/',
'docs/v6.5/',
'docs/',
'docs/v6.4/',
],
Expand All @@ -307,8 +319,8 @@ export default withMermaid(defineConfigWithTheme<ThemeConfig>({
versionSwitcher: {
paths: [
{
'docs/v6.6rc': 'v6.6 (RC)',
'docs': 'v6.5 (stable)',
'docs': 'v6.6 (stable)',
'docs/v6.5': 'v6.5',
'docs/v6.4': 'v6.4',
'docs/v6.3': 'v6.3',
}
Expand Down Expand Up @@ -473,8 +485,8 @@ export default withMermaid(defineConfigWithTheme<ThemeConfig>({
],
},
{
src: './docs/v6.6rc/products/extensions/b2b-suite/guides/example-plugins',
dst: 'docs/v6.6rc/products/extensions/b2b-suite/guides/example-plugins',
src: './docs/v6.5/products/extensions/b2b-suite/guides/example-plugins',
dst: 'docs/v6.5/products/extensions/b2b-suite/guides/example-plugins',
ext: [
'.zip'
],
Expand Down
13 changes: 6 additions & 7 deletions .vitepress/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ const navigation = buildSidebarNav('./src/', [
items: [
{
text: "Meteor Admin SDK",
// link: "/resources/admin-extension-sdk/",
link: 'https://shopware.github.io/meteor-admin-sdk/',
link: "/resources/admin-extension-sdk/",
repo: 'shopware/meteor-admin-sdk',
},
{
Expand Down Expand Up @@ -92,21 +91,21 @@ const navigation = buildSidebarNav('./src/', [
},
], [
//'/docs/',
'/docs/v6.6rc/',
'/docs/v6.5/',
'/docs/v6.4/',
'/docs/v6.3/',
//'/resources/admin-extension-sdk/',
'/resources/admin-extension-sdk/',
//'/resources/meteor-component-library/',
'/', // always have root sidebar
'/resources/meteor-icon-kit/',
'/release-notes/',
], [
'/docs/assets/',
'/docs/v6.6rc/assets/',
'/docs/v6.5/assets/',
'/docs/snippets/',
'/docs/v6.6rc/snippets/',
'/docs/v6.5/snippets/',
'/docs/README.md',
'/docs/v6.6rc/README.md',
'/docs/v6.5/README.md',
]);

const prefixItems = (items, prefix) => items.map(item => {
Expand Down
24 changes: 11 additions & 13 deletions .vitepress/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"src": ".",
"dst": [
"docs",
"v6.6rc"
"v6.5"
],
"branch": [
"env.BRANCH_DOCS_66",
"next-6.6"
"env.BRANCH_DOCS_65",
"v6.5"
],
"org": [
"env.ORG_DOCS_66",
"env.ORG_DOCS_65",
"shopware"
]
},
Expand All @@ -42,7 +42,7 @@
"v6.4"
],
"org": [
"env.ORG_DOCS",
"env.ORG_DOCS_64",
"shopware"
]
},
Expand All @@ -58,7 +58,7 @@
"v6.3.0"
],
"org": [
"env.ORG_DOCS",
"env.ORG_DOCS_63",
"shopware"
]
},
Expand Down Expand Up @@ -108,23 +108,21 @@
"skip": true
},
{
"name": "shopware/admin-extension-sdk",
"name": "shopware/meteor",
"src": [
"docs",
"docs",
"guide"
"packages",
"admin-sdk",
"docs"
],
"dst": "resources/admin-extension-sdk",
"branch": [
"env.BRANCH_ADMIN_EXTENSION_SDK",
"DX-223",
"main"
],
"org": [
"env.ORG_ADMIN_EXTENSION_SDK",
"shopware"
],
"skip": true
]
},
{
"name": "shopware/meteor",
Expand Down
Loading

0 comments on commit 6c35b61

Please sign in to comment.