File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
apps/website/src/routes/docs Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { component$ , Slot , useContext } from '@builder.io/qwik' ;
2
+ import { DocumentHead } from '@builder.io/qwik-city' ;
2
3
import { MaterialProvider } from '../../components/material' ;
3
4
import { Menu } from '../../components/menu/menu' ;
4
5
import { APP_STATE } from '../../constants' ;
@@ -27,3 +28,19 @@ export default component$(() => {
27
28
</ >
28
29
) ;
29
30
} ) ;
31
+
32
+ export const head : DocumentHead = ( { url } ) => {
33
+ const UrlPathList = url . pathname . split ( '/' ) . filter ( ( path ) => path !== '' ) ;
34
+ if ( UrlPathList . length === 3 ) {
35
+ const Component =
36
+ UrlPathList [ 2 ] . charAt ( 0 ) . toUpperCase ( ) + UrlPathList [ 2 ] . slice ( 1 ) ;
37
+ const ComponentTheme =
38
+ UrlPathList [ 1 ] . charAt ( 0 ) . toUpperCase ( ) + UrlPathList [ 1 ] . slice ( 1 ) ;
39
+ return {
40
+ title : `${ Component } | ${ ComponentTheme } | QwikUI` ,
41
+ } ;
42
+ }
43
+ return {
44
+ title : `Docs | QwikUI` ,
45
+ } ;
46
+ } ;
You can’t perform that action at this time.
0 commit comments