Skip to content

Commit fa1bd23

Browse files
committed
Сортировка файлов и каталогов в api осени
1 parent e5d6a97 commit fa1bd23

File tree

49 files changed

+96
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+96
-3
lines changed

.vitepress/config.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default defineConfig({
3939

4040
rewrites(id) {
4141
return id
42-
.replace(/\d+-/, '') // удаление префикса сортировки
42+
.replace(/\d+-/g, '') // удаление префикса сортировки
4343
.replaceAll('\\', '/') // замена обратных виндовых слешей на прямые
4444
.replaceAll('products/autumn/', '') // подмена пути products/autumn на корень
4545
.replaceAll('products/', ''); // удаление префикса products
@@ -278,7 +278,7 @@ function getSidebarItem(contentRoot, file: string): DefaultTheme.SidebarItem {
278278

279279
const sidebarItem: DefaultTheme.SidebarItem = {
280280
text: frontmatter.title || pageName,
281-
link: "/" + file.replace(/\d+-/, '').replaceAll('\\', '/')
281+
link: "/" + file.replace(/\d+-/g, '').replaceAll('\\', '/')
282282
};
283283

284284
return sidebarItem;

0 commit comments

Comments
 (0)