Skip to content
Snippets Groups Projects
config.js 3.26 KiB
import { defineUserConfig } from 'vuepress'
import { viteBundler } from '@vuepress/bundler-vite'
import { getDirname, path } from '@vuepress/utils'
import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
import { hopeTheme } from 'vuepress-theme-hope'

const __dirname = getDirname(import.meta.url)

export default defineUserConfig({
  lang: 'en-US',
  title: false,
  description: 'My iGEM Wiki',
  dest: 'public',
  base: "/msp-maastricht/",
  theme: hopeTheme({
    logo: 'https://static.igem.wiki/teams/5306/logo-linear.png',
    home: "/",
    navbar: [
      { text: 'Home', link: '/' },
      { 
        text: 'Team',
        children: [
          { text: 'Team', link: '/team' },
          { text: 'Attributions', link: '/attributions' }
        ]
      },
      { 
        text: 'Project',
        children: [
          { text: 'Contribution', link: '/contribution' },
          { text: 'Description', link: '/description' },
          { text: 'Engineering', link: '/engineering'},
          { text: 'Parts', link: '/parts'},
        ]
      },
      { text: 'Human Practices', link: '/human-practices' },
      { 
        text: 'Awards',
        children: [
          { text: 'Education', link: '/education' },
          { text: 'Sustainable', link: '/sustainable'},
          { text: 'New Basic Part', link: '/new-basic-part'},
        ]
      },
    ],
    sidebar: {
      '/team/': [
        {
          text: 'Team',
          children: [
            '/team/', // Corresponds to '/team/README.md' or '/team/index.md'
            '/team/attributions', // Corresponds to '/team/attributions.md'
          ],
        },
      ],
      '/project/': [
        {
          text: 'Project',
          children: [
            '/project/contribution',
            '/project/description',
            '/project/engineering',
            '/project/parts',
          ],
        },
      ],
      '/human-practices/': [
        {
          text: 'Human Practices',
          children: ['/human-practices/'], // Make sure file path exists
        },
      ],
      '/awards/': [
        {
          text: 'Awards',
          children: [
            '/awards/education',
            '/awards/sustainable',
            '/awards/new-basic-part',
          ],
        },
      ],
      '/': [
        {
          text: 'On This Page',
          children: 'auto',
        },
      ],
      '/team': false, // Disable sidebar on /team path (if needed)
    },
  }),
  bundler: viteBundler({
    viteOptions: {},
    vuePluginOptions: {},
  }),
  plugins: [
    registerComponentsPlugin({
      componentsDir: path.resolve(__dirname, './components'),
    }),
  ],
  alias: {
    "@theme-hope/components/PageFooter": path.resolve(
      __dirname, "./components/CustomFooter.vue"
    )
  },
  
  head: [
    ['link', { rel: 'icon', href: 'https://static.igem.wiki/teams/5306/natronaut-logo-no-text.png' }],
    ["link", { rel: "preconnect", href: "https://fonts.googleapis.com" }],
    ["link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: "" }],
    ["link", { 
      rel: "stylesheet", 
      href: "https://fonts.googleapis.com/css2?family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&display=swap", 
    }],
  ],

  styles: [
    path.resolve(__dirname, './styles/index.scss'),
  ],
  
})