|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | +import head from "./head" |
| 3 | +import { pagefindPlugin } from 'vitepress-plugin-pagefind' |
| 4 | + |
| 5 | +import type { ThemeConfig } from 'vitepress-theme-mild'; |
| 6 | +import { defineConfigWithTheme } from 'vitepress'; |
| 7 | +import baseConfig from 'vitepress-theme-mild/config'; |
| 8 | + |
| 9 | +export default defineConfigWithTheme<ThemeConfig>({ |
| 10 | + extends: baseConfig, |
| 11 | + vite: { |
| 12 | + build: { |
| 13 | + rollupOptions: { |
| 14 | + output: { |
| 15 | + manualChunks(id) { |
| 16 | + // Split heavy dependencies into their own chunks |
| 17 | + if (id.includes('shiki')) return 'shiki'; // Syntax highlighter is huge |
| 18 | + if (id.includes('vue')) return 'vue-core'; |
| 19 | + if (id.includes('vitepress-theme-mild')) return 'theme'; |
| 20 | + } |
| 21 | + } |
| 22 | + } |
| 23 | + }, |
| 24 | + plugins: [ |
| 25 | + pagefindPlugin() |
| 26 | + ] |
| 27 | + }, |
| 28 | + title: "Java", |
| 29 | + description: "Java Notes", |
| 30 | + //base: '/java/', |
| 31 | + head, |
| 32 | + markdown: { |
| 33 | + math: true |
| 34 | + }, |
| 35 | + themeConfig: { |
| 36 | + |
| 37 | + search: { |
| 38 | + provider: 'local', |
| 39 | + options: { |
| 40 | + detailedView: true |
| 41 | + } |
| 42 | + }, |
| 43 | + docContentSlideEnter: { |
| 44 | + enable: { |
| 45 | + development: true, |
| 46 | + production: true |
| 47 | + }, |
| 48 | + delay: 100 |
| 49 | + }, |
| 50 | + editLink: { |
| 51 | + pattern: 'https://github.com/nullptr-t-oss/java/blob/main/src/:path' |
| 52 | + }, |
| 53 | + nav: [ |
| 54 | + { text: 'Home', link: '/' }, |
| 55 | + { text: 'Contribue to this project', link: '/contribute' }, |
| 56 | + { text: 'Our Team', link: '/team' } |
| 57 | + ], |
| 58 | + |
| 59 | + sidebar: [ |
| 60 | + { |
| 61 | + text: 'Introduciton', |
| 62 | + collapsed: false, |
| 63 | + items: [ |
| 64 | + { text: 'About Java', link: '/intro/About Java' }, |
| 65 | + { text: 'OOP', link: '/intro/OOP' } |
| 66 | + ] |
| 67 | + }, |
| 68 | + { |
| 69 | + text: 'Variables and Datatypes', |
| 70 | + collapsed: true, |
| 71 | + items: [ |
| 72 | + { text: 'Datatypes', link: '/variables-datatypes/Datatypes' }, |
| 73 | + { text: 'Typecasting', link: '/variables-datatypes/Typecasting' }, |
| 74 | + { text: 'Operators and Expressions', link: '/variables-datatypes/Operators and Expressions' } |
| 75 | + ] |
| 76 | + }, |
| 77 | + { |
| 78 | + text: 'Methods', |
| 79 | + collapsed: true, |
| 80 | + items: [ |
| 81 | + { text: 'Introduction', link: '/Methods/Introduction' }, |
| 82 | + { text: 'Method Overloading', link: '/Methods/Method Overloading' } |
| 83 | + ] |
| 84 | + }, |
| 85 | + { |
| 86 | + text: 'Encapsulation', |
| 87 | + collapsed: true, |
| 88 | + items: [ |
| 89 | + { text: 'Introduction', link: '/Encapsulation/Introduction' }, |
| 90 | + { text: 'Access Specifier', link: '/Encapsulation/Access Specifier or Visibility Modifiers' } |
| 91 | + ] |
| 92 | + }, |
| 93 | + { |
| 94 | + text: 'Constructors', |
| 95 | + collapsed: true, |
| 96 | + items: [ |
| 97 | + { text: 'Introduction', link: '/Constructors/Introduction' } |
| 98 | + ] |
| 99 | + }, |
| 100 | + { |
| 101 | + text: 'Library Functions', |
| 102 | + collapsed: true, |
| 103 | + items: [ |
| 104 | + { |
| 105 | + text: 'Math', |
| 106 | + collapsed: true, |
| 107 | + items: [ |
| 108 | + { text: 'Basic Math Functions', link: '/Libs/Maths/Basic Math Functions' } |
| 109 | + ] |
| 110 | + }, |
| 111 | + { |
| 112 | + text: 'Wrapper Classes', |
| 113 | + collapsed: true, |
| 114 | + items: [ |
| 115 | + { text: 'Introduction', link: '/Libs/Wrapper Classes/Introduction' }, |
| 116 | + { text: 'Utility Methods', link: '/Libs/Wrapper Classes/Utility Methods' } |
| 117 | + ] |
| 118 | + }, |
| 119 | + ] |
| 120 | + }, |
| 121 | + { |
| 122 | + text: 'String', |
| 123 | + collapsed: true, |
| 124 | + items: [ |
| 125 | + { text: 'Introduction', link: '/string/Introduction' }, |
| 126 | + { text: 'compareTo()', link: '/string/CompareTo()' }, |
| 127 | + { text: 'equals() & equalsIgnoreCase()', link: '/string/equals() & equalsIgnoreCase()' }, |
| 128 | + { text: 'indexOf() & lastIndexOf()', link: '/string/indexOf() & lastIndexOf()' }, |
| 129 | + { text: 'lowerCase() & upperCase()', link: '/string/lowerCase() & upperCase()' }, |
| 130 | + { text: 'substring()', link: '/string/substring()' } |
| 131 | + ] |
| 132 | + }, |
| 133 | + { |
| 134 | + text: 'Arrays', |
| 135 | + collapsed: true, |
| 136 | + items: [ |
| 137 | + { text: 'Introduction', link: '/Arrays/Introduction' }, |
| 138 | + { text: 'Searching Algorithms', link: '/Arrays/Searching' }, |
| 139 | + { text: 'Sorting Algorithms', link: '/Arrays/Sorting' } |
| 140 | + ] |
| 141 | + }, |
| 142 | + { |
| 143 | + text: 'Boolean algebra', |
| 144 | + collapsed: true, |
| 145 | + items: [ |
| 146 | + { text: 'Laws', link: '/boolean-algebra/Laws' }, |
| 147 | + { text: 'K-map', link: '/boolean-algebra/K-map' } |
| 148 | + ] |
| 149 | + }, |
| 150 | + { |
| 151 | + text: 'Data Structures & Algorithms', |
| 152 | + collapsed: true, |
| 153 | + items: [ |
| 154 | + { text: 'Introduction', link: '/Data Structures & Algorithms/Introduction' }, |
| 155 | + { |
| 156 | + text: 'Data Structures', |
| 157 | + collapsed: true, |
| 158 | + items: [ |
| 159 | + { text: 'Introduction', link: '/Data Structures & Algorithms/Data Structures/Introduction' }, |
| 160 | + { text: 'Queue', link: '/Data Structures & Algorithms/Data Structures/Queue' }, |
| 161 | + { text: 'Deque', link: '/Data Structures & Algorithms/Data Structures/Deque' } |
| 162 | + ] |
| 163 | + }, |
| 164 | + { |
| 165 | + text: 'Algorithms', |
| 166 | + collapsed: true, |
| 167 | + items: [ |
| 168 | + { text: 'Introduction', link: '/Data Structures & Algorithms/Algorithms/Introduction' } |
| 169 | + ] |
| 170 | + }, |
| 171 | + ] |
| 172 | + }, |
| 173 | + { |
| 174 | + text: 'Hardware', |
| 175 | + collapsed: true, |
| 176 | + items: [ |
| 177 | + { text: 'Encoder', link: '/Hardware/Encoder' } |
| 178 | + ] |
| 179 | + }, |
| 180 | + { |
| 181 | + text: 'Extra', |
| 182 | + collapsed: true, |
| 183 | + items: [ |
| 184 | + { text: 'Memory', link: '/extra/Memory' } |
| 185 | + ] |
| 186 | + },{ |
| 187 | + text: 'Programs', |
| 188 | + collapsed: true, |
| 189 | + items: [ |
| 190 | + { text: 'Array Programs', link: '/programs/Array Programs' } |
| 191 | + ] |
| 192 | + }, |
| 193 | + { |
| 194 | + text: 'Downloads', |
| 195 | + collapsed: true, |
| 196 | + items: [ |
| 197 | + { text: 'eBooks', link: '/Downloads/eBooks' } |
| 198 | + ] |
| 199 | + } |
| 200 | + ], |
| 201 | + |
| 202 | + socialLinks: [ |
| 203 | + { icon: 'github', link: 'https://github.com/nullptr-t-oss/java' } |
| 204 | + ] |
| 205 | + } |
| 206 | +}) |
0 commit comments