|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | +import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons' |
| 3 | + |
| 4 | +const settings = { |
| 5 | + siteTitle: 'Docker Deploy', // For Site Sidebar |
| 6 | + title: 'Docker Stack Deploy Action', // For Actual Title |
| 7 | + name: 'Deploy to Docker from GitHub Actions', // For Meta Tag |
| 8 | + description: { |
| 9 | + short: |
| 10 | + 'Easily Deploy a Docker Swarm or Compose Stack File to a Remote Host over SSH from the Actions Workspace.', |
| 11 | + long: 'Easily Deploy a Docker Swarm Stack or Compose Stack File to a Remote Host over SSH with Keyfile or Password Authentication from the Actions Workspace.', |
| 12 | + }, |
| 13 | + image: '/images/logo/logo512.png', |
| 14 | + color: '#0064FC', |
| 15 | + docs_repo: 'https://github.com/cssnr/stack-deploy-docs', |
| 16 | + source_repo: 'https://github.com/cssnr/stack-deploy-action', |
| 17 | + actions_url: 'https://github.com/marketplace/actions/docker-stack-deploy', |
| 18 | +} |
| 19 | + |
| 20 | +// https://vitepress.dev/reference/site-config |
| 21 | +// noinspection JSUnusedGlobalSymbols |
| 22 | +export default defineConfig({ |
| 23 | + srcDir: './docs', |
| 24 | + // base: '/path/', |
| 25 | + vite: { |
| 26 | + server: { |
| 27 | + allowedHosts: true, |
| 28 | + }, |
| 29 | + plugins: [ |
| 30 | + groupIconVitePlugin({ |
| 31 | + customIcon: { |
| 32 | + git: 'vscode-icons:file-type-git', |
| 33 | + }, |
| 34 | + }), |
| 35 | + ], |
| 36 | + }, |
| 37 | + markdown: { |
| 38 | + config(md) { |
| 39 | + md.use(groupIconMdPlugin) |
| 40 | + }, |
| 41 | + }, |
| 42 | + |
| 43 | + title: settings.title, |
| 44 | + description: settings.description.short, |
| 45 | + head: [ |
| 46 | + ['link', { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], |
| 47 | + ['link', { rel: 'apple-touch-icon', type: 'image/png', sizes: '180x180', href: '/apple-touch-icon.png' }], |
| 48 | + ['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/images/logo/logo32.png' }], |
| 49 | + ['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/images/logo/logo16.png' }], |
| 50 | + |
| 51 | + ['meta', { name: 'darkreader-lock' }], |
| 52 | + |
| 53 | + ['meta', { name: 'theme-color', content: settings.color }], |
| 54 | + ['meta', { name: 'description', content: settings.description.long }], |
| 55 | + |
| 56 | + ['meta', { property: 'og:type', content: 'website' }], |
| 57 | + ['meta', { property: 'og:site_name', content: settings.name }], |
| 58 | + ['meta', { property: 'og:title', content: settings.title }], |
| 59 | + ['meta', { property: 'og:description', content: settings.description.short }], |
| 60 | + ['meta', { property: 'og:image', content: settings.image }], |
| 61 | + ['meta', { property: 'og:image:alt', content: settings.title }], |
| 62 | + |
| 63 | + ['meta', { property: 'twitter:card', content: 'summary' }], |
| 64 | + ['meta', { property: 'twitter:site', content: settings.name }], |
| 65 | + ['meta', { property: 'twitter:title', content: settings.title }], |
| 66 | + ['meta', { property: 'twitter:description', content: settings.description.short }], |
| 67 | + ['meta', { property: 'twitter:image', content: settings.image }], |
| 68 | + ['meta', { property: 'twitter:image:alt', content: settings.title }], |
| 69 | + ], |
| 70 | + |
| 71 | + cleanUrls: true, |
| 72 | + themeConfig: { |
| 73 | + // https://vitepress.dev/reference/default-theme-config |
| 74 | + siteTitle: settings.siteTitle, |
| 75 | + logo: '/images/logo/logo32.png', |
| 76 | + nav: [ |
| 77 | + { text: 'Home', link: '/' }, |
| 78 | + { text: 'Guides', link: '/guides/get-started', activeMatch: '/guides/' }, |
| 79 | + { text: 'Docs', link: '/docs/inputs', activeMatch: '/docs/' }, |
| 80 | + { text: 'Support', link: '/support' }, |
| 81 | + { |
| 82 | + text: 'Links', |
| 83 | + items: [ |
| 84 | + { text: 'GitHub Repository', link: settings.source_repo }, |
| 85 | + { text: 'GitHub Marketplace', link: settings.actions_url }, |
| 86 | + { text: 'GitHub Documentation', link: settings.docs_repo }, |
| 87 | + { text: 'Portainer Stack Deploy', link: 'https://github.com/cssnr/portainer-stack-deploy-action' }, |
| 88 | + { text: 'Developer Site', link: 'https://cssnr.github.io/' }, |
| 89 | + { text: 'Contribute', link: 'https://ko-fi.com/cssnr' }, |
| 90 | + ], |
| 91 | + }, |
| 92 | + ], |
| 93 | + |
| 94 | + socialLinks: [ |
| 95 | + { icon: 'github', link: settings.source_repo }, |
| 96 | + { |
| 97 | + icon: { |
| 98 | + svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10.984 13.836a.5.5 0 0 1-.353-.146l-.745-.743a.5.5 0 1 1 .706-.708l.392.391 1.181-1.18a.5.5 0 0 1 .708.707l-1.535 1.533a.504.504 0 0 1-.354.146zm9.353-.147l1.534-1.532a.5.5 0 0 0-.707-.707l-1.181 1.18-.392-.391a.5.5 0 1 0-.706.708l.746.743a.497.497 0 0 0 .706-.001zM4.527 7.452l2.557-1.585A1 1 0 0 0 7.09 4.17L4.533 2.56A1 1 0 0 0 3 3.406v3.196a1.001 1.001 0 0 0 1.527.85zm2.03-2.436L4 6.602V3.406l2.557 1.61zM24 12.5c0 1.93-1.57 3.5-3.5 3.5a3.503 3.503 0 0 1-3.46-3h-2.08a3.503 3.503 0 0 1-3.46 3 3.502 3.502 0 0 1-3.46-3h-.558c-.972 0-1.85-.399-2.482-1.042V17c0 1.654 1.346 3 3 3h.04c.244-1.693 1.7-3 3.46-3 1.93 0 3.5 1.57 3.5 3.5S13.43 24 11.5 24a3.502 3.502 0 0 1-3.46-3H8c-2.206 0-4-1.794-4-4V9.899A5.008 5.008 0 0 1 0 5c0-2.757 2.243-5 5-5s5 2.243 5 5a5.005 5.005 0 0 1-4.952 4.998A2.482 2.482 0 0 0 7.482 12h.558c.244-1.693 1.7-3 3.46-3a3.502 3.502 0 0 1 3.46 3h2.08a3.503 3.503 0 0 1 3.46-3c1.93 0 3.5 1.57 3.5 3.5zm-15 8c0 1.378 1.122 2.5 2.5 2.5s2.5-1.122 2.5-2.5-1.122-2.5-2.5-2.5S9 19.122 9 20.5zM5 9c2.206 0 4-1.794 4-4S7.206 1 5 1 1 2.794 1 5s1.794 4 4 4zm9 3.5c0-1.378-1.122-2.5-2.5-2.5S9 11.122 9 12.5s1.122 2.5 2.5 2.5 2.5-1.122 2.5-2.5zm9 0c0-1.378-1.122-2.5-2.5-2.5S18 11.122 18 12.5s1.122 2.5 2.5 2.5 2.5-1.122 2.5-2.5zm-13 8a.5.5 0 1 0 1 0 .5.5 0 0 0-1 0zm2 0a.5.5 0 1 0 1 0 .5.5 0 0 0-1 0zm12 0c0 1.93-1.57 3.5-3.5 3.5a3.503 3.503 0 0 1-3.46-3.002c-.007.001-.013.005-.021.005l-.506.017h-.017a.5.5 0 0 1-.016-.999l.506-.017c.018-.002.035.006.052.007A3.503 3.503 0 0 1 20.5 17c1.93 0 3.5 1.57 3.5 3.5zm-1 0c0-1.378-1.122-2.5-2.5-2.5S18 19.122 18 20.5s1.122 2.5 2.5 2.5 2.5-1.122 2.5-2.5z"/></svg>', |
| 99 | + }, |
| 100 | + link: settings.actions_url, |
| 101 | + }, |
| 102 | + { icon: 'vitepress', link: settings.docs_repo }, |
| 103 | + { |
| 104 | + icon: { |
| 105 | + svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12.504 0v1.023l-.01-.015l-6.106 3.526H3.417v.751h5.359v3.638h1.942V5.284h1.786V15.7c.027 0 .54-.01.751.091V5.285h.531v10.608c.293.147.55.312.751.54V5.286h6.046v-.75h-1.267l-6.061-3.5V0zm0 1.87v2.664H7.889zm.751.031l4.56 2.633h-4.56zM9.142 5.285h1.21v1.686h-1.21zm-4.736 2.73v1.951h1.942v-1.95zm2.19 0v1.951h1.941v-1.95zm-2.19 2.171v1.951h1.942v-1.95zm2.19 0v1.951h1.941v-1.95zm2.18 0v1.951h1.942v-1.95zM4.36 12.43a3.73 3.73 0 0 0-.494 1.851c0 1.227.604 2.308 1.52 2.986c.239-.064.477-.1.724-.11c.1 0 .165.01.266.019c.284-1.191 1.383-1.988 2.665-1.988c.724 0 1.438.201 1.924.668c.229-.476.302-1.007.302-1.575c0-.65-.165-1.292-.494-1.85zm4.828 3.16c-1.21 0-2.226.844-2.492 1.97a1 1 0 0 0-.275-.009a2.56 2.56 0 0 0-2.564 2.556a2.565 2.565 0 0 0 3.096 2.5A2.58 2.58 0 0 0 9.233 24c.862 0 1.622-.43 2.09-1.081a2.557 2.557 0 0 0 4.186-1.97c0-.567-.193-1.099-.504-1.52a2.557 2.557 0 0 0-3.866-2.94a2.57 2.57 0 0 0-1.951-.898z"/></svg>', |
| 106 | + }, |
| 107 | + link: 'https://github.com/cssnr/portainer-stack-deploy-action', |
| 108 | + }, |
| 109 | + { icon: 'discord', link: 'https://discord.gg/wXy6m2X8wY' }, |
| 110 | + { icon: 'kofi', link: 'https://ko-fi.com/cssnr' }, |
| 111 | + { |
| 112 | + icon: { |
| 113 | + svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: none;" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg>', |
| 114 | + }, |
| 115 | + link: 'https://cssnr.github.io/', |
| 116 | + }, |
| 117 | + ], |
| 118 | + |
| 119 | + sidebar: [ |
| 120 | + { |
| 121 | + text: 'Guides', |
| 122 | + base: '/guides', |
| 123 | + items: [ |
| 124 | + { text: 'Get Started', link: '/get-started' }, |
| 125 | + { text: 'Features', link: '/features' }, |
| 126 | + { text: 'Examples', link: '/examples' }, |
| 127 | + // |
| 128 | + ], |
| 129 | + }, |
| 130 | + { |
| 131 | + text: 'Documentation', |
| 132 | + base: '/docs', |
| 133 | + items: [ |
| 134 | + { text: 'Inputs', link: '/inputs' }, |
| 135 | + // |
| 136 | + ], |
| 137 | + }, |
| 138 | + { |
| 139 | + text: 'Support', |
| 140 | + items: [ |
| 141 | + { text: 'Get Help', link: '/support' }, |
| 142 | + // |
| 143 | + ], |
| 144 | + }, |
| 145 | + ], |
| 146 | + |
| 147 | + editLink: { |
| 148 | + pattern: `${settings.docs_repo}/blob/master/docs/:path`, |
| 149 | + text: 'View on GitHub', |
| 150 | + }, |
| 151 | + |
| 152 | + lastUpdated: { |
| 153 | + text: 'Updated at', |
| 154 | + formatOptions: { |
| 155 | + dateStyle: 'medium', |
| 156 | + timeStyle: 'medium', |
| 157 | + }, |
| 158 | + }, |
| 159 | + |
| 160 | + search: { |
| 161 | + provider: 'local', |
| 162 | + // provider: 'algolia', |
| 163 | + // options: { |
| 164 | + // appId: '92WIHGWBPF', |
| 165 | + // apiKey: '17f27bbfbb03ba96e4ca53714e29fe62', |
| 166 | + // indexName: 'stack-deploy-docs', |
| 167 | + // }, |
| 168 | + }, |
| 169 | + |
| 170 | + // footer: { |
| 171 | + // message: '<a href="/privacy">Privacy Policy</a>', |
| 172 | + // copyright: '<a href="/privacy">Privacy Policy</a>', |
| 173 | + // }, |
| 174 | + |
| 175 | + externalLinkIcon: true, |
| 176 | + outline: 'deep', |
| 177 | + }, |
| 178 | +}) |
0 commit comments