From 0c9c350c0cae8bfbbda756271ef71cd772349052 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 6 Nov 2023 14:43:25 +0100 Subject: [PATCH 1/3] separate config in different files --- docs/.vuepress/config.js | 81 +++----------------------------- docs/.vuepress/config/meta.js | 7 +++ docs/.vuepress/config/plugins.js | 18 +++++++ docs/.vuepress/config/theme.js | 54 +++++++++++++++++++++ 4 files changed, 85 insertions(+), 75 deletions(-) create mode 100644 docs/.vuepress/config/meta.js create mode 100644 docs/.vuepress/config/plugins.js create mode 100644 docs/.vuepress/config/theme.js diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index ac3af1c..5301d24 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,79 +1,10 @@ -import { searchProPlugin } from 'vuepress-plugin-search-pro' -import { hopeTheme } from 'vuepress-theme-hope' import { defineUserConfig } from 'vuepress' +import meta from './config/meta' +import theme from './config/theme' +import plugins from './config/plugins' export default defineUserConfig({ - title: 'IT Team for Change', - description: 'IT4C.dev introduces the IT Team for Change, applied Philosophy and Projects.', - head: [ - ['meta', {name: 'viewport', content: 'width=device-width,initial-scale=1'}] - ], - theme: hopeTheme({ - logo: '/it4c-logo2-clean-bg_alpha-128x128.png', - docsRepo: 'https://github.com/IT4Change/IT4C.dev', - docsBranch: 'master', - docsDir: 'docs', - editLink: true, - lastUpdated: false, - contributors: false, - navbar: [ - { text: 'IT4C', link: '/' }, - { text: 'Contact', link: '/contact' }, - { - text: 'Github', - link: 'https://github.com/IT4Change' - }, - ], - sidebar: [ - { - text: 'IT4C', - link: '/', - collapsible: false, - children: [ - '/history', - '/contact' - ] - }, - { - text: 'Projects', - collapsible: false, - children: [ - { - text: 'Gradido Software', - link: '/projects/gradido' - }, - // { link: '/extras/contributing', text: 'Contributing ✨' }, - // { link: '/extras/license', text: 'License 📚' }, - ] - }, - { - text: 'People', - collapsible: false, - children: [ - '/people/alexander-friedland', - '/people/hannes-heine', - { link: '/people/mathias-lenz', text: 'Mathias Lenz' }, - '/people/moriz-wahl', - '/people/ulf-gebhardt', - '/people/wolfgang-huss' - ] - } - ], - }), - plugins: [ - searchProPlugin({ - indexContent: true, - autoSuggestions: true, - customFields: [ - { - getter: (page) => page.frontmatter.category, - formatter: "Category: $content", - }, - { - getter: (page) => page.frontmatter.tag, - formatter: "Tag: $content", - }, - ], - }), - ], + ...meta, + theme, + plugins, }) diff --git a/docs/.vuepress/config/meta.js b/docs/.vuepress/config/meta.js new file mode 100644 index 0000000..5a7a405 --- /dev/null +++ b/docs/.vuepress/config/meta.js @@ -0,0 +1,7 @@ +export default { + title: 'IT Team for Change', + description: 'IT4C.dev introduces the IT Team for Change, applied Philosophy and Projects.', + head: [ + ['meta', {name: 'viewport', content: 'width=device-width,initial-scale=1'}] + ], +} \ No newline at end of file diff --git a/docs/.vuepress/config/plugins.js b/docs/.vuepress/config/plugins.js new file mode 100644 index 0000000..c4d4eae --- /dev/null +++ b/docs/.vuepress/config/plugins.js @@ -0,0 +1,18 @@ +import { searchProPlugin } from 'vuepress-plugin-search-pro' + +export default [ + searchProPlugin({ + indexContent: true, + autoSuggestions: true, + customFields: [ + { + getter: (page) => page.frontmatter.category, + formatter: "Category: $content", + }, + { + getter: (page) => page.frontmatter.tag, + formatter: "Tag: $content", + }, + ], + }), +] \ No newline at end of file diff --git a/docs/.vuepress/config/theme.js b/docs/.vuepress/config/theme.js new file mode 100644 index 0000000..721070a --- /dev/null +++ b/docs/.vuepress/config/theme.js @@ -0,0 +1,54 @@ +import { hopeTheme } from 'vuepress-theme-hope' + +export default hopeTheme({ + logo: '/it4c-logo2-clean-bg_alpha-128x128.png', + docsRepo: 'https://github.com/IT4Change/IT4C.dev', + docsBranch: 'master', + docsDir: 'docs', + editLink: true, + lastUpdated: false, + contributors: false, + navbar: [ + { text: 'IT4C', link: '/' }, + { text: 'Contact', link: '/contact' }, + { + text: 'Github', + link: 'https://github.com/IT4Change' + }, + ], + sidebar: [ + { + text: 'IT4C', + link: '/', + collapsible: false, + children: [ + '/history', + '/contact' + ] + }, + { + text: 'Projects', + collapsible: false, + children: [ + { + text: 'Gradido Software', + link: '/projects/gradido' + }, + // { link: '/extras/contributing', text: 'Contributing ✨' }, + // { link: '/extras/license', text: 'License 📚' }, + ] + }, + { + text: 'People', + collapsible: false, + children: [ + '/people/alexander-friedland', + '/people/hannes-heine', + { link: '/people/mathias-lenz', text: 'Mathias Lenz' }, + '/people/moriz-wahl', + '/people/ulf-gebhardt', + '/people/wolfgang-huss' + ] + } + ], +}) From ec418041ec6ea0f746a3ab4b61919052203ed3f1 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 6 Nov 2023 14:44:30 +0100 Subject: [PATCH 2/3] define github specific config to deploy on a subpath and correc workflow --- .github/workflows/vuepress-deploy.yml | 3 +-- docs/.vuepress/config.github.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 docs/.vuepress/config.github.js diff --git a/.github/workflows/vuepress-deploy.yml b/.github/workflows/vuepress-deploy.yml index 57a035f..7acfe29 100644 --- a/.github/workflows/vuepress-deploy.yml +++ b/.github/workflows/vuepress-deploy.yml @@ -18,6 +18,5 @@ jobs: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} TARGET_REPO: IT4Change/IT4C.dev TARGET_BRANCH: gh-pages - BUILD_SCRIPT: npm install && npm run build-node16 + BUILD_SCRIPT: npm install && npm run build-node16 -- --config docs/.vuepress/config github.js BUILD_DIR: docs/.vuepress/dist - CNAME: https://it4change.github.io/IT4C.dev/ diff --git a/docs/.vuepress/config.github.js b/docs/.vuepress/config.github.js new file mode 100644 index 0000000..80ed2c0 --- /dev/null +++ b/docs/.vuepress/config.github.js @@ -0,0 +1,11 @@ +import { defineUserConfig } from 'vuepress' +import meta from './config/meta' +import theme from './config/theme' +import plugins from './config/plugins' + +export default defineUserConfig({ + base: "/IT4C.dev/", + ...meta, + theme, + plugins, +}) From f288fd6e00fa0150b4cc74e1397ce0b6356b26fe Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 7 Nov 2023 08:58:56 +0100 Subject: [PATCH 3/3] solve merge conflict --- docs/.vuepress/config/theme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/.vuepress/config/theme.js b/docs/.vuepress/config/theme.js index 721070a..4ba5513 100644 --- a/docs/.vuepress/config/theme.js +++ b/docs/.vuepress/config/theme.js @@ -26,7 +26,7 @@ export default hopeTheme({ '/contact' ] }, - { + /*{ text: 'Projects', collapsible: false, children: [ @@ -37,7 +37,7 @@ export default hopeTheme({ // { link: '/extras/contributing', text: 'Contributing ✨' }, // { link: '/extras/license', text: 'License 📚' }, ] - }, + },*/ { text: 'People', collapsible: false,