Skip to content

Commit 78e07f5

Browse files
committed
feat: link to root page
1 parent 1c3a736 commit 78e07f5

File tree

15 files changed

+448
-59
lines changed

15 files changed

+448
-59
lines changed

.github/workflows/deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [$default-branch]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: 'deploy'
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: pnpm install
22+
uses: falcondev-it/.github/actions/pnpm-install@master
23+
24+
- name: Setup Pages
25+
uses: actions/configure-pages@v5
26+
27+
- name: Build
28+
run: pnpm run build
29+
30+
- name: Upload artifact
31+
uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: ./dist
34+
35+
deploy:
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
40+
runs-on: ubuntu-latest
41+
needs: build
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

.prettierignore

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
dist/
2-
.nuxt/
3-
.nitro/
4-
.output/
5-
.temp/
2+
.vitepress/cache/
63
node_modules/
7-
.data/
8-
drizzle/
94

10-
pnpm-lock.yaml
5+
pnpm-lock.yaml

.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ export default defineConfigWithDefaults({
4040
themeConfig: {
4141
logo: '/logo.svg',
4242
},
43+
srcExclude: ['./packages/'],
4344
})

.vitepress/theme/CustomLayout.vue

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ import DefaultTheme, { VPFeatures } from 'vitepress/theme'
77
const { Layout } = DefaultTheme
88
99
const { frontmatter: fm } = useData()
10-
11-
const origin = window.location.origin
12-
console.log('origin', origin, fm.value['grouped-features'])
10+
const origin = import.meta.env.SSR ? '' : window.location.origin
1311
const groupedFeatures = computed(() =>
1412
groupBy(
15-
fm.value['grouped-features'].map((feature) => ({
13+
((fm.value['groupedFeatures'] as any[])?.map((feature) => ({
1614
...feature,
1715
link: origin + feature.link,
1816
target: '_self',
@@ -21,20 +19,38 @@ const groupedFeatures = computed(() =>
2119
...feature.icon,
2220
src: origin + feature.icon.src,
2321
},
24-
})) as { group?: string }[],
22+
})) ?? []) as { group?: string }[],
2523
prop('group'),
2624
),
2725
)
2826
</script>
2927

3028
<template>
3129
<Layout>
30+
<template #nav-bar-title-before>
31+
<div class="header-title-prefix" v-if="!fm['hideRootLink']">
32+
<a href="/" target="_self">@falcondev-oss</a>
33+
<span style="font-size: 1.5rem">/</span>
34+
</div>
35+
</template>
3236
<template #home-features-after>
33-
<VPFeatures
34-
v-for="(features, idx) of groupedFeatures"
35-
:features="features"
36-
:style="{ marginTop: idx === 0 ? 0 : '8px' }"
37-
/>
37+
<VPFeatures v-for="(features, group) of groupedFeatures" :features="features" />
3838
</template>
3939
</Layout>
4040
</template>
41+
42+
<style>
43+
.header-title-prefix {
44+
display: flex;
45+
gap: 0.25rem;
46+
color: var(--vp-c-text-3);
47+
font-weight: 600;
48+
margin-right: 0.75rem;
49+
}
50+
51+
.header-title-prefix > a:hover {
52+
text-underline-offset: 0.4rem;
53+
text-decoration-thickness: 0.1rem !important;
54+
text-decoration: underline;
55+
}
56+
</style>

.vitepress/theme/custom.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:root {
2+
--vp-home-hero-name-color: transparent;
3+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #7e2ffc 30%, #59befe);
4+
5+
--vp-c-brand-1: #7356fd;
6+
--vp-c-brand-2: var(--vp-c-purple-2);
7+
--vp-c-brand-3: var(--vp-c-purple-3);
8+
--vp-c-brand-soft: var(--vp-c-purple-soft);
9+
}
10+
11+
@view-transition {
12+
navigation: auto;
13+
}

.vitepress/theme/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import DefaultTheme from 'vitepress/theme'
2+
import './custom.css'
23
import 'virtual:group-icons.css'
34
import CustomLayout from './CustomLayout.vue'
45

default-config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ export function defineConfigWithDefaults(config: UserConfig<DefaultTheme.Config>
66
return defu(
77
config,
88
defineConfig({
9+
outDir: new URL('./dist' + (config.base ?? ''), import.meta.url).pathname,
910
vite: {
11+
// @ts-expect-error plugin type
1012
plugins: [groupIconVitePlugin()],
1113
},
1214
markdown: {

eslint.config.js

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
11
// @ts-check
22
import eslintConfig from '@louishaftmann/eslint-config'
3-
import tanstackQueryPlugin from '@tanstack/eslint-plugin-query'
43

54
export default eslintConfig({
6-
nuxt: true,
5+
nuxt: false,
76
tsconfigPath: './tsconfig.json',
7+
}).append({
8+
ignores: ['node_modules/', 'dist/', './**/.vitepress/cache/', 'pnpm-lock.yaml'],
89
})
9-
.append(tanstackQueryPlugin.configs['flat/recommended'])
10-
.append({
11-
ignores: [
12-
'node_modules/',
13-
'dist/',
14-
'.nuxt/',
15-
'.nitro/',
16-
'.output/',
17-
'.temp/',
18-
'.data/',
19-
'drizzle/',
20-
'pnpm-lock.yaml',
21-
],
22-
})

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="vite/client" />
2+
3+
interface ImportMeta {
4+
readonly env: ImportMetaEnv
5+
}

index.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: home
33

44
hero:
55
name: falconDev
6-
text: Open-Source packages
7-
tagline: Focusing on type safety and developer experience
6+
text: Open-Source
7+
tagline: Outstanding Type-Safety and Developer Experience without compromise.
88
image:
99
src: /logo.svg
1010
alt: falconDev
@@ -16,25 +16,28 @@ hero:
1616
text: Sponsors
1717
link: https://github.com/sponsors/falcondev-oss
1818

19-
grouped-features:
19+
hideRootLink: true
20+
groupedFeatures:
2021
- title: Caps
21-
details: Type-safe access control made simple
22+
details: Readable access control logic with generators
2223
link: '/caps/'
2324
linkText: Learn more
2425
group: 0
2526
icon:
2627
src: /caps/logo.svg
2728
alt: Caps
29+
2830
- title: Form
29-
details: Type-safe form handling made simple
31+
details: Reactive form state management & validation
3032
link: '/form/'
3133
linkText: Learn more
3234
group: 0
3335
icon:
3436
src: /form/logo.svg
3537
alt: Form
38+
3639
- title: Lang
37-
details: Type-safe form handling made simple
40+
details: i18n with convenient in-editor preview
3841
link: '/lang/'
3942
linkText: Learn more
4043
group: 0
@@ -43,7 +46,7 @@ grouped-features:
4346
alt: Lang
4447

4548
- title: tRPC Vue Query
46-
details: Type-safe form handling made simple
49+
details: TanStack Vue-Query client for tRPC
4750
link: '/trpc-vue-query/'
4851
linkText: Learn more
4952
group: 1
@@ -52,15 +55,16 @@ grouped-features:
5255
alt: tRPC Vue Query
5356

5457
- title: GHA Cache Server
55-
details: Type-safe form handling made simple
58+
details: Self-Hosted Cache Server for GitHub Actions
5659
link: '/gha-cache-server/'
5760
linkText: Learn more
5861
group: 1
5962
icon:
6063
src: /gha-cache-server/logo.svg
6164
alt: GHA Cache Server
65+
6266
- title: util
63-
details: Type-safe form handling made simple
67+
details: Collection of utility functions and types
6468
link: '/util/'
6569
linkText: Learn more
6670
group: 2
@@ -69,15 +73,16 @@ grouped-features:
6973
alt: util
7074

7175
- title: configs
72-
details: Type-safe form handling made simple
76+
details: Our opinionated configs for development tools
7377
link: '/configs/'
7478
linkText: Learn more
7579
group: 2
7680
icon:
7781
src: /configs/logo.svg
7882
alt: configs
83+
7984
- title: nitro-trpc-event-handler
80-
details: Type-safe form handling made simple
85+
details: tRPC integration for Nitro backends
8186
link: '/nitro-trpc-event-handler/'
8287
linkText: Learn more
8388
group: 2
@@ -86,7 +91,7 @@ grouped-features:
8691
alt: nitro-trpc-event-handler
8792

8893
- title: expo-event-source-polyfill
89-
details: Type-safe form handling made simple
94+
details: A polyfill for the EventSource API in Expo using `expo/fetch`
9095
link: '/expo-event-source-polyfill/'
9196
linkText: Learn more
9297
group: 2

0 commit comments

Comments
 (0)