diff --git a/UPGRADE.md b/UPGRADE.md index 7483741c..df4aff05 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -2,10 +2,10 @@ ## Next -### Configuration file structure change +### Configuration file structure changes The 2.0 version introduces many configuration changes. Most of them will -gracefuly fallback to older version until 3.0, but some have been removed +gracefully fallback to older version until 3.0, but some have been removed and will cause exceptions. Rationale is that now, all top-level configuration options can be directly @@ -16,7 +16,7 @@ Please read carefully the new sample configuration files: - For Symfony: [config/packages/db_tools.yaml](./config/packages/db_tools.yaml) - For standalone: [config/db_tools.standalone.yaml](./config/db_tools.standalone.yaml) -And the the [CHANGELOG.md](./CHANGELOG.md) file and fix your configuration accordingly. +And the [changelog](./changelog) file and fix your configuration accordingly. The `backupper_binaries` and `backupper_options` as well as the `restorer_binaries` and `restorer_options` options have been removed and will raise exception when diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 600553b8..9f55fd73 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,10 +1,12 @@ import { defineConfig } from 'vitepress' +import MarkdownItContainer from 'markdown-it-container' +import { flavorList } from './theme/components/flavor' // https://vitepress.dev/reference/site-config export default defineConfig({ lang: 'en', title: 'DbToolsBundle', - description: 'A Symfony bundle to backup, restore and anonymize your data', + description: 'A PHP library to backup, restore and anonymize databases', srcDir: "content", base: "/", metaChunk: false, @@ -27,31 +29,6 @@ export default defineConfig({ nav: [ { text: 'Home', link: '/' }, ], - editLink: { - pattern: 'https://github.com/makinacorpus/DbToolsBundle/blob/main/docs/content/:path', - text: 'Edit this page on Github' - }, - docFooter: { - prev: 'Previous page', - next: 'Next page' - }, - outlineTitle: 'On this page', - lastUpdated: { - text: 'Last updated', - formatOptions: { - dateStyle: 'short' - } - }, - search: { - provider: 'local' - }, - footer: { - message: 'Released under the MIT License.', - copyright: 'Copyright © 2023-present Makina Corpus' - }, - socialLinks: [ - { icon: 'github', link: 'https://github.com/makinacorpus/DbToolsBundle' } - ], sidebar: [ { text: 'Getting Started', @@ -87,6 +64,8 @@ export default defineConfig({ { text: 'Statistics', link: '/stats' }, { text: 'Configuration basics', link: '/configuration/basics' }, { text: 'Configuration reference', link: '/configuration/reference' }, + { text: 'Changelog', link: '/changelog'}, + { text: 'Upgrade guide', link: '/upgrade'}, ] }, { @@ -96,8 +75,54 @@ export default defineConfig({ { text: 'How to help ?', link: '/contribute/contribute' }, { text: 'Development guide', link: '/contribute/guide' }, { text: 'Creating a pack of anonymizers', link: '/contribute/pack' }, + { text: 'Code of conduct', link: '/contribute/code-of-conduct' }, ] }, - ] + ], + editLink: { + pattern: 'https://github.com/makinacorpus/DbToolsBundle/blob/main/docs/content/:path', + text: 'Edit this page on Github' + }, + docFooter: { + prev: 'Previous page', + next: 'Next page' + }, + outlineTitle: 'On this page', + lastUpdated: { + text: 'Last updated', + formatOptions: { + dateStyle: 'short' + } + }, + search: { + provider: 'local' + }, + footer: { + message: 'Released under the MIT License.', + copyright: 'Copyright © 2023-present Makina Corpus' + }, + socialLinks: [ + { icon: 'github', link: 'https://github.com/makinacorpus/DbToolsBundle' } + ], + }, + markdown: { + config: (md) => { + function render(tokens, idx) { + const m: string = tokens[idx].info.trim() + + if (tokens[idx].nesting === 1) { + const flavors = m.split(' ').join('-') + // opening tag + return '
\n' + } else { + // closing tag + return '
\n' + } + } + + flavorList.forEach(f => { + md.use(MarkdownItContainer, f, { marker: '@', render }) + }) + } } }) diff --git a/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcher.vue b/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcher.vue index 26a486f3..26c2aeee 100644 --- a/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcher.vue +++ b/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcher.vue @@ -1,5 +1,7 @@ @@ -19,22 +21,29 @@ const id = Math.random().toString(36).substring(2, 6); Symfony - + + + + - + - Docker - (soon) - + Laravel + (experimental) + @@ -60,29 +69,25 @@ input[type="radio"] { opacity: 0; pointer-events: none; } -input[type="radio"] + label { +input[type="radio"] + label, .flavor-switch .button { cursor: pointer; padding: 0px 4px; border-radius: 4px; border: solid 1px transparent; - /* var(--vp-c-text-1); */ display: flex; gap: 2px; align-items: center; + text-decoration: none; + color: var(--vp-c-text-1); + font-weight: 400; } -input[type="radio"] + label > svg { +input[type="radio"] + label > svg, .flavor-switch .button > svg { fill: var(--vp-c-text-1); } - -input[type="radio"][disabled] + label { - color: var(--vp-c-border); - /* border-color: var(--vp-c-border); */ - cursor: not-allowed; -} -input[type="radio"][disabled] + label > svg { - fill: var(--vp-c-border); +input[type="radio"]:hover:not(:checked) + label, .flavor-switch .button:hover { + background-color: color-mix(in oklab, var(--vp-makina-logo-text) 20%, transparent); + color: var(--vp-c-text-1); } - input[type="radio"]:checked + label { color: var(--vp-c-brand-lighter); background-color: var(--vp-c-brand-1); @@ -91,6 +96,43 @@ input[type="radio"]:checked + label { input[type="radio"]:checked + label > svg { fill: var(--vp-c-brand-lighter); } + +input[value="symfony"]:checked + label { + color: #FFFFFF; + background-color: #000000; + border-color: #000000; +} +input[value="symfony"]:checked + label > svg { + fill: #FFFFFF; +} +.dark { + input[value="symfony"]:checked + label { + color: #000000; + background-color: #FFFFFF; + border-color: #FFFFFF; + } + input[value="symfony"]:checked + label > svg { + fill: #000000; + } +} + +input[value="laravel"]:checked + label { + color: #FFFFFF; + background-color: #F5382E; + border-color: #F5382E; +} +input[value="laravel"]:checked + label > svg { + fill: #FFFFFF; +} + +input[value="docker"]:checked + label { + color: #FFFFFF; + background-color: #1D63ED; + border-color: #1D63ED; +} +input[value="docker"]:checked + label > svg { + fill: #FFFFFF; +} small { font-size: 10px; } diff --git a/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcherWrapper.vue b/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcherWrapper.vue index 16db2de0..b36c13c8 100644 --- a/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcherWrapper.vue +++ b/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcherWrapper.vue @@ -1,5 +1,5 @@ @@ -21,7 +21,7 @@ details { border-bottom: 1px solid var(--vt-c-divider-light); transition: border-color .5s,background-color .5s ease; position: sticky; - top: -.5px; + top: -33px; background-color: var(--vp-c-bg-alt); padding-top: 10px; padding-bottom: 1px; @@ -48,4 +48,10 @@ a.info { border-radius: 100%; line-height: 14px; } + +@media (min-width: 960px) { + details { + top: -.5px; + } +} diff --git a/docs/.vitepress/theme/components/DbToolsBundleHomeImage.vue b/docs/.vitepress/theme/components/DbToolsBundleHomeImage.vue index 71411a2e..38beccf6 100644 --- a/docs/.vitepress/theme/components/DbToolsBundleHomeImage.vue +++ b/docs/.vitepress/theme/components/DbToolsBundleHomeImage.vue @@ -7,20 +7,21 @@ + d="M 11.52,162 C 11.52,81.677 135.31,16.56 288,16.56 440.69,16.56 564.48,81.676 564.48,162 564.48,242.322 440.69,307.44 288,307.44 135.31,307.44 11.52,242.323 11.52,162" + id="path182" /> - - - - - + + + + - + - + @@ -47,62 +48,79 @@ d="m130.09 105.43a0.67505 0.67505 0 0 0-1.0835-0.24302l-3.4006 3.1382-1.4539-0.31221-0.31221-1.4539 3.1381-3.4006a0.67505 0.67505 0 0 0-0.24302-1.0835 6.0755 6.0755 0 0 0-8.3538 5.6333 6.1042 6.1042 0 0 0 0.50629 2.442l-5.0806 4.3929c-0.0127 0.0101-0.0245 0.0219-0.0363 0.0329a2.7005 2.7005 0 0 0 3.8191 3.8191c0.011-0.011 0.0228-0.0236 0.0329-0.0354l4.392-5.0823a6.0755 6.0755 0 0 0 8.5175-5.5692 6.0383 6.0383 0 0 0-0.44216-2.2783zm-5.6333 7.0037a4.7372 4.7372 0 0 1-2.2842-0.59068 0.67505 0.67505 0 0 0-0.83706 0.14936l-4.7169 5.4629a1.3501 1.3501 0 0 1-1.9087-1.9087l5.4586-4.7161a0.67505 0.67505 0 0 0 0.14936-0.83791 4.7254 4.7254 0 0 1 4.9245-6.9454l-2.6327 2.8529a0.67505 0.67505 0 0 0-0.1637 0.59911l0.4776 2.2218a0.67505 0.67505 0 0 0 0.5181 0.5181l2.2235 0.4776a0.67505 0.67505 0 0 0 0.5991-0.1637l2.8529-2.6327a4.7304 4.7304 0 0 1-4.6604 5.5135z" style="fill:var(--vp-c-brand);" stroke-width=".08444" /> - -