Skip to content

Commit c9e69ff

Browse files
committed
Made the sample changes for Misael
1 parent 485f158 commit c9e69ff

File tree

4 files changed

+49
-3
lines changed

4 files changed

+49
-3
lines changed

.vuepress/config.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ export default defineUserConfig({
4343
navbar: [
4444
{ text: 'Building', link: '/building/' },
4545
{ text: 'Maintenance', link: '/maintenance/' },
46-
{ text: 'Software', link: '/software/' }
46+
{ text: 'Software', link: '/software/' },
47+
{ text: 'Your New Section', link: '/your-section/' } // Add this line
4748
],
4849
sidebar: {
4950
'/building/': getBuildingSidebar(),
5051
'/maintenance/': getMaintenanceSidebar(),
5152
'/software/': getSoftwareSidebar(),
53+
'/your-section/': getYourSectionSidebar() // Add this line
5254
}
5355
}),
5456

@@ -79,7 +81,7 @@ export default defineUserConfig({
7981
const sassLoaderRule = config.module.rules.find((rule) => {
8082
return rule.use && rule.use.some((loader) => loader.loader.includes('sass-loader'));
8183
});
82-
84+
8385
if (sassLoaderRule) {
8486
sassLoaderRule.use = sassLoaderRule.use.map((loader) => {
8587
if (loader.loader.includes('sass-loader')) {
@@ -122,7 +124,7 @@ export default defineUserConfig({
122124
.options({
123125
name: `[path][name].[ext]`
124126
});
125-
127+
126128
config.module
127129
.rule('vue')
128130
.use('vue-loader')
@@ -209,4 +211,22 @@ function getSoftwareSidebar() {
209211
],
210212
},
211213
];
214+
}
215+
216+
/**
217+
* Sidebar configuration for /your-section/
218+
*/
219+
function getYourSectionSidebar() {
220+
return [
221+
{
222+
text: 'Your Section Title',
223+
link: '/your-section/',
224+
collapsible: true,
225+
children: [
226+
'/your-section/page1.md', // Maps to `your-section/page1.md`
227+
'/your-section/page2.md', // Maps to `your-section/page2.md`
228+
// Add more pages as needed
229+
],
230+
},
231+
];
212232
}

your-section/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Your section
3+
lang: en-US
4+
---
5+
6+
# {{ $frontmatter.title }}
7+
8+
## Introduction
9+
10+
This is a new section

your-section/page1.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Page1
3+
lang: en-US
4+
---
5+
6+
# {{ $frontmatter.title }}
7+
8+
## This is page 1

your-section/page2.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Page2
3+
lang: en-US
4+
---
5+
6+
# {{ $frontmatter.title }}
7+
8+
## This is page 2

0 commit comments

Comments
 (0)