Skip to content

Commit

Permalink
Merge pull request #893 from GrabarzUndPartner/feature/docs
Browse files Browse the repository at this point in the history
Feature/docs
  • Loading branch information
ThornWalli authored Nov 11, 2023
2 parents 6a92576 + fbae8df commit fee172b
Show file tree
Hide file tree
Showing 109 changed files with 4,296 additions and 20,188 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ sw.js
.output

src/runtime/tmpl/**/*
docs/.vitepress/dist
docs/.vitepress/cache
4 changes: 2 additions & 2 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- uses: actions/setup-node@v4
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- uses: actions/setup-node@v4
Expand All @@ -70,7 +70,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- uses: actions/setup-node@v4
Expand All @@ -159,15 +159,15 @@ jobs:
- name: Build
run: |
cd ./docs
npm run generate
touch .output/public/.nojekyll
npm run docs:build
touch docs/.vitepress/dist/.nojekyll
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: docsArtifact
path: docs/.output/public
path: docs/.vitepress/dist

sitespeed:
runs-on: ${{ matrix.os }}
Expand All @@ -176,7 +176,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- name: docker pull
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]
steps:
- name: Download Artifact (Docs)
uses: actions/download-artifact@master
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ sw.*
.output
eslint-report.json
.env

# docs
docs/.vitepress/dist
docs/.vitepress/cache
3 changes: 0 additions & 3 deletions docs/.env.example

This file was deleted.

12 changes: 0 additions & 12 deletions docs/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions docs/.npmrc

This file was deleted.

1 change: 0 additions & 1 deletion docs/.nvmrc

This file was deleted.

50 changes: 4 additions & 46 deletions docs/components/Logo.vue → docs/.vitepress/components/Logo.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<template>
<svg
id="Ebene_1"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
x="0"
y="0"
viewBox="0 0 949 114"
style="enable-background: new 0 0 949 114"
xml:space="preserve"
>
<svg viewBox="0 0 949 114">
<path
d="M256.9 37.6c3.4 4 5.1 10 5.1 18V85c0 2.2-.7 4-2 5.3-1.3 1.3-3.1 1.9-5.4 1.9s-4.1-.6-5.5-1.9c-1.4-1.3-2-3-2-5.3V56.5c0-4.5-.9-7.8-2.6-9.9-1.7-2.1-4.4-3.1-8.1-3.1-4.3 0-7.8 1.3-10.3 4.1-2.6 2.7-3.9 6.3-3.9 10.9V85c0 2.2-.7 4-2 5.3-1.4 1.3-3.2 1.9-5.5 1.9s-4.1-.6-5.4-1.9c-1.3-1.3-2-3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0-3.8-.5-5-1.4s-1.7-2.3-1.7-4.2.6-3.2 1.7-4.2 2.8-1.4 5-1.4h6v-11c0-2.1.7-3.9 2-5.1 1.4-1.3 3.2-1.9 5.5-1.9 2.2 0 4 .6 5.4 1.9 1.4 1.3 2 3 2 5.1v11h10.2c2.1 0 3.8.5 5 1.4 1.1 1 1.7 2.3 1.7 4.2s-.6 3.2-1.7 4.2c-1.2 1-2.8 1.4-5 1.4h-10.2v27.1c0 5.9 2.7 9 8.1 9.4l3.2.2c4 .2 6 2 6 5.4z"
/>
Expand All @@ -25,7 +16,7 @@
/>
<path
d="m153.8 71.4-4.4 4.5-14.5-14.5 4.5-4.5 14.4 14.5z"
style="fill: url(#SVGID_1_)"
style="fill: #e83162"
/>
<path
fill="#E83162"
Expand All @@ -35,10 +26,7 @@
fill="#AF235C"
d="M103.3 42.6 61.8 1.2c-1.1-1.1-2.9-1.1-4 0L47.3 11.6c-1.1 1.1-1.1 2.9 0 4l41.5 41.5 14.5-14.5z"
/>
<path
d="m103.3 42.6-4.5-4.5-14.5 14.5 4.4 4.5 14.6-14.5z"
style="fill: url(#SVGID_2_)"
/>
<path d="m103.3 42.6-4.5-4.5-14.5 14.5 4.4 4.5 14.6-14.5z" fill="#AF235C" />
<path
fill="#E83162"
d="M103.3 42.6 47.4 98.5c-1.1 1.1-1.1 2.9 0 4l10.5 10.4c1.1 1.1 2.9 1.1 4 0l53.8-53.8c1.1-1.1 1.1-2.9 0-4l-12.4-12.5z"
Expand All @@ -52,42 +40,12 @@ export default {};

<style scoped>
svg {
width: 100%;
display: block;
width: 100%;
aspect-ratio: 949 / 114;
}
path:not([fill]) {
fill: currentColor;
}
</style>

<!--
<style>
.st0 {
fill: #fff
}

.st1 {
fill: #e83162
}

.st2 {
fill: #af235c
}</style> -->

<style lang="ts" scoped>
css({
svg: {
color: '{color.gray.900}',
height: '{space.6}',
width: 'auto',
'@dark': {
color: '{color.gray.100}'
},
'@sm': {
height: '{space.7}'
}
}
});
</style>
57 changes: 57 additions & 0 deletions docs/.vitepress/components/VPNavBarTitle.vue
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>
53 changes: 53 additions & 0 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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(() => ({
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.',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config

logoComponent: true,

...navigation,

socialLinks: [
{ icon: 'github', link: 'https://github.com/GrabarzUndPartner/nuxt-speedkit' }
]
},

sitemap: {
hostname: 'https://nuxt-speedkit.grabarzundpartner.dev'
}
}));

function getBaseUrl() {
return process.env.npm_config_base_url || process.env.BASE_URL || '/';
}
Loading

0 comments on commit fee172b

Please sign in to comment.