Skip to content

Commit

Permalink
docs(update docs to new theme): update docs to new vsf theme and add …
Browse files Browse the repository at this point in the history
…sdk docs
  • Loading branch information
LeoMunizOdoo committed Oct 23, 2023
1 parent 53abcf6 commit 1183ef9
Show file tree
Hide file tree
Showing 98 changed files with 2,175 additions and 2,739 deletions.
221 changes: 105 additions & 116 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,126 +1,115 @@
const { description } = require('../../package');
const GTM_TAG = 'GTM-WMDC3CP';

module.exports = {
title: 'Vue Storefront 2 for Odoo',
title: 'Odoo Integration',
base: '/odoo/',
description: description,
head: [
['link', { rel: 'icon', href: '/favicon.png' }],
['meta', { name: 'theme-color', content: '#3eaf7c' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],

// Google Tag Manager
['script', {}, [`
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','${GTM_TAG}');
`]],
],
description: 'This project is a Odoo integration documentation',
head: [['link', { rel: 'icon', href: '/favicon.png' }]],
theme: 'vsf-docs',
configureWebpack: (config) => {
config.module.rules = config.module.rules.map(rule => ({
config.module.rules = config.module.rules.map((rule) => ({
...rule,
use: rule.use && rule.use.map(useRule => ({
...useRule,
options: useRule.loader === 'url-loader' ?
/**
Hack for loading images properly.
ref: https://github.com/vuejs/vue-loader/issues/1612#issuecomment-559366730
use:
rule.use &&
rule.use.map((useRule) => ({
...useRule,
options:
useRule.loader === 'url-loader'
? /**
Hack for loading images properly.
ref: https://github.com/vuejs/vue-loader/issues/1612#issuecomment-559366730
*/
{ ...useRule.options, esModule: false } :
useRule.options
}))
}))
{ ...useRule.options, esModule: false }
: useRule.options
}))
}));
},
plugins: [
['@kawarimidoll/tailwind', { prefix: 'tw-' }],
'@vuepress/plugin-back-to-top',
[
'@vuepress/plugin-medium-zoom',
{
// This selector excludes images from the "Integrations" page
selector: 'main :not(.tile-image) > img'
}
],
'@vuepress/active-header-links',
'@vuepress/search'
],
themeConfig: {
GTM_TAG,
repo: 'https://github.com/vuestorefront-community/odoo/',
editLinks: true,
docsDir: 'docs',
docsBranch: 'develop',
editLinkText: 'Edit this page',
logo: 'https://user-images.githubusercontent.com/1626923/137092657-fb398d20-b592-4661-a1f9-4135db0b61d5.png',
nav: [
{
text: 'Demo',
link: 'https://vsf.labs.odoogap.com/',
},
{ text: 'Vue Storefront', link: 'https://vuestorefront.io/' },
{ text: 'GitHub', link: 'https://github.com/vuestorefront-community/odoo'},
{ text: 'Core Documentation', link: 'https://docs.vuestorefront.io/v2/' },
],
sidebar: [
{
title: 'Essentials',
collapsable: false,
children: [
['/', 'Introduction'],
'/essentials/features',
'/essentials/ecosystem',
'/essentials/configuration',
'/essentials/maintainers'
]
},
{
title: 'Guides',
collapsable: true,
children: [
'/guides/imageHandle',
'/guides/customQueries',
'/guides/customApis',
'/guides/payment'
]
},
{
title: 'Composables',
collapsable: true,
children: [
['/composables/useCart', 'useCart'],
['/composables/useCategory', 'useCategory'],
['/composables/useFacet', 'useFacet'],
['/composables/useProduct', 'useProduct'],
['/composables/useShipping', 'useShipping'],
['/composables/useUser', 'useUser'],
['/composables/useUserBilling', 'useUserBilling'],
['/composables/useWishlist', 'useWishlist'],
['/composables/useOrder', 'useOrder'],
['/composables/usePassword', 'usePassword'],
['/composables/useProductVariant', 'useProductVariant'],
['/composables/useCountrySearch', 'useCountrySearch'],
['/composables/customQueries', 'customQueries'],
]
},
{
title: 'Tips',
collapsable: true,
children: [
['/tips/customTypes', 'Custom types'],
['/tips/i18n', 'i18n'],
]
},{
title: 'Reference',
children: [
['/api/featureList', 'Feature List'],
['/api/apiList', 'Api List'],

]
},
{ text: 'Core Documentation', link: 'https://docs.vuestorefront.io/v2/' }
],
},
}
sidebar: {
'/': [
{
title: 'Essentials',
collapsable: false,
children: [
['/', 'Introduction'],

'/essentials/maintainers'
]
},
{
title: 'VSF SDK',
collapsable: false,
children: [
['/overview/', 'Overview'],
]
},
{
title: 'VSF v2',
collapsable: true,
children: [
{
title: 'Introduction',
collapsable: false,
children: [
['/introduction/demo', 'Demonstration'],
['/introduction/quick-start/starting-new', 'New project'],
['/introduction/quick-start/testing-local', 'Integration test'],
]
},
{
title: 'Configuration',
collapsable: true,
children: [
['/configuration/assets', 'Assets'],
['/configuration/docker-compose', 'Docker Compose'],
['/configuration/eco', 'Ecosystem'],
['/configuration/envs', 'Enviroment'],
['/configuration/middleware', 'Middleware'],
['/configuration/routes', 'Routes'],
]
},
{
title: 'Guides',
collapsable: true,
children: [
['/guides/customApis', 'Custom Apis'],
['/guides/customQueries', 'Custom queries'],
['/guides/payment', 'Payment']
]
},
{
title: 'Composables',
collapsable: true,
children: [
['/composables/customQueries', 'customQueries'],
['/composables/useCart', 'useCart'],
['/composables/useCategory', 'useCategory'],
['/composables/useFacet', 'useFacet'],
['/composables/useShipping', 'useShipping'],
['/composables/useShippingProvider', 'useShippingProvider'],
['/composables/useUser', 'useUser'],
['/composables/useUserBilling', 'useUserBilling'],
['/composables/useWishlist', 'useWishlist'],
['/composables/useOrder', 'useOrder'],
['/composables/usePassword', 'usePassword'],
['/composables/useProductVariant', 'useProductVariant'],
['/composables/useCountrySearch', 'useCountrySearch']
]
},
{
title: 'Tips',
collapsable: true,
children: [
['/tips/customTypes.md', 'Custom Apis'],
['/tips/i18n.md', 'i18n']
]
},
]
},

]
}
}
};
10 changes: 1 addition & 9 deletions docs/.vuepress/enhanceApp.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
/**
* Client app enhancement file.
*
* https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
*/

export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData // site metadata
}) => {
// ...apply enhancements for the site.
}
}) => { }
Binary file added docs/.vuepress/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 1 addition & 10 deletions docs/.vuepress/styles/palette.styl
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
/**
* Custom palette here.
*
* ref:https://v1.vuepress.vuejs.org/zh/config/#palette-styl
*/

$accentColor = #22c34b
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34
$accentColor = #22c34b;
3 changes: 0 additions & 3 deletions docs/.vuepress/theme/index.js

This file was deleted.

Loading

0 comments on commit 1183ef9

Please sign in to comment.