mirror of
https://github.com/gromlab-ru/slm-design.git
synced 2026-08-22 07:30:16 +03:00
feat: add example
This commit is contained in:
@@ -1,24 +1,10 @@
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { defineConfig } from 'vitepress'
|
||||
import { slugifyHeading } from '../../scripts/lib/slugify-heading.mjs'
|
||||
|
||||
const repositoryUrl = 'https://github.com/gromlab-ru/slm-design'
|
||||
const viteConfigPath = fileURLToPath(new URL('../vite.config.mts', import.meta.url))
|
||||
|
||||
function slugifyHeading(value: string) {
|
||||
const slug = value
|
||||
.replace(/<[^>]+>/g, '')
|
||||
.replace(/`/g, '')
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, '-')
|
||||
.replace(/[^\p{L}\p{N}_-]/gu, '')
|
||||
.replace(/-+/g, '-')
|
||||
|
||||
return ['app', 'compositions', 'domains', 'infra', 'ui', 'shared'].includes(slug)
|
||||
? `layer-${slug}`
|
||||
: slug
|
||||
}
|
||||
|
||||
const documentationSidebar = [
|
||||
{
|
||||
text: 'SLM Level 1',
|
||||
|
||||
Reference in New Issue
Block a user