-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfae1cf
commit 3dae7b4
Showing
134 changed files
with
939 additions
and
24,466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ sw.js | |
.output | ||
|
||
src/runtime/tmpl/**/* | ||
docs/.vitepress/dist | ||
docs/.vitepress/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<script setup> | ||
import { useData } from 'vitepress/dist/client/theme-default/composables/data'; | ||
import { useLangs } from 'vitepress/dist/client/theme-default/composables/langs'; | ||
import { useSidebar } from 'vitepress/dist/client/theme-default/composables/sidebar'; | ||
import { normalizeLink } from 'vitepress/dist/client/theme-default/support/utils'; | ||
import VPImage from 'vitepress/dist/client/theme-default/components/VPImage.vue'; | ||
import Logo from './Logo.vue'; | ||
const { site, theme } = useData(); | ||
const { hasSidebar } = useSidebar(); | ||
const { currentLang } = useLangs(); | ||
</script> | ||
|
||
<template> | ||
<div class="VPNavBarTitle" :class="{ 'has-sidebar': hasSidebar }"> | ||
<a class="title" :href="theme.logoLink ?? normalizeLink(currentLang.link)"> | ||
<slot name="nav-bar-title-before" /> | ||
<logo v-if="theme.logoComponent" class="logo" /> | ||
<v-p-image v-else-if="theme.logo" class="logo" :image="theme.logo" /> | ||
<template v-else-if="theme.siteTitle">{{ theme.siteTitle }}</template> | ||
<template v-else-if="theme.siteTitle === undefined">{{ | ||
site.title | ||
}}</template> | ||
<slot name="nav-bar-title-after" /> | ||
</a> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.title { | ||
display: flex; | ||
align-items: center; | ||
width: 100%; | ||
height: var(--vp-nav-height); | ||
font-size: 16px; | ||
font-weight: 600; | ||
color: var(--vp-c-text-1); | ||
border-bottom: 1px solid transparent; | ||
transition: opacity 0.25s; | ||
} | ||
@media (width >= 960px) { | ||
.title { | ||
flex-shrink: 0; | ||
} | ||
/* stylelint-disable-next-line selector-class-pattern */ | ||
.VPNavBarTitle.has-sidebar .title { | ||
border-bottom-color: var(--vp-c-divider); | ||
} | ||
} | ||
:deep(.logo) { | ||
height: var(--vp-nav-logo-height); | ||
margin-right: 8px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,53 @@ | ||
import { defineConfig } from 'vitepress' | ||
import { fileURLToPath } from 'url'; | ||
import { defineConfig } from 'vitepress'; | ||
import markdownItInlineComments from 'markdown-it-inline-comments'; | ||
import navigation from './navigation.mjs'; | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
|
||
export default defineConfig(() => ({ | ||
markdown: { | ||
config: md => { | ||
md.use(markdownItInlineComments); | ||
} | ||
}, | ||
|
||
base: getBaseUrl(), | ||
|
||
vite: { | ||
resolve: { | ||
alias: [ | ||
{ | ||
find: /^.*\/VPNavBarTitle\.vue$/, | ||
replacement: fileURLToPath( | ||
new URL('./components/VPNavBarTitle.vue', import.meta.url) | ||
) | ||
} | ||
] | ||
} | ||
}, | ||
|
||
srcDir: 'src', | ||
|
||
title: "Nuxt Speedkit", | ||
description: "Nuxt Speedkit takes over the Lighthouse performance optimization of your generated website.", | ||
title: 'Nuxt Speedkit', | ||
description: | ||
'Nuxt Speedkit takes over the Lighthouse performance optimization of your generated website.', | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
|
||
nav: [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Examples', link: '/markdown-examples' } | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
text: 'Home', | ||
link: '/', | ||
// items: [ | ||
// { text: 'Markdown Examples', link: '/markdown-examples' }, | ||
// { text: 'Runtime API Examples', link: '/api-examples' } | ||
// ] | ||
}, | ||
{ | ||
text: 'Concept', | ||
link: '/concept' | ||
}, | ||
{ | ||
text: 'Guide', | ||
items: [ | ||
{text: 'Setup', link: '/guide/setup'}, | ||
{text: 'Options', link: '/guide/options'}, | ||
{text: 'Usage', link: '/guide/usage'}, | ||
{text: 'Caveats', link: '/guide/caveats'} | ||
] | ||
}, | ||
{ | ||
text: 'Composables', | ||
items: [ | ||
{text: 'useFont', link: '/composables/useFont'}, | ||
{text: 'useCritical', link: '/composables/useCritical'}, | ||
{text: 'useConfig', link: '/composables/useConfig'}, | ||
{text: 'useComponentObserver', link: '/composables/useComponentObserver'} | ||
|
||
logoComponent: true, | ||
|
||
] | ||
}, | ||
{ | ||
text: 'Directives', | ||
items:[ | ||
{text: 'v-font', link: '/directives/v-font'}, | ||
] | ||
}, | ||
{ | ||
text: 'Components', | ||
items: [ | ||
{text: 'SpeedkitLayer', link: '/components/speedkit-layer'}, | ||
] | ||
} | ||
], | ||
...navigation, | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://nuxt-speedkit.grabarzundpartner.dev/' } | ||
] | ||
}, | ||
|
||
sitemap: { | ||
hostname: 'https://example.com' | ||
} | ||
}) | ||
})); | ||
|
||
function getBaseUrl() { | ||
return process.env.npm_config_base_url || process.env.BASE_URL || '/'; | ||
} |
Oops, something went wrong.