undocs 0.2.27 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/app.vue +7 -0
- package/app/nuxt.config.ts +1 -1
- package/app/tailwind.config.ts +14 -2
- package/app/utils/seo.ts +16 -13
- package/package.json +1 -1
- package/app/public/fonts/nunito-latin-400-italic-Daxm5UzsKq.woff2 +0 -0
- package/app/public/fonts/nunito-latin-400-normal-nPlM7mbm0W.woff2 +0 -0
- package/app/public/fonts/nunito-latin-500-italic-IlVtAGJo00.woff2 +0 -0
- package/app/public/fonts/nunito-latin-500-normal-zkQUyo5lvz.woff2 +0 -0
- package/app/public/fonts/nunito-latin-600-normal-IMulf98v4m.woff2 +0 -0
- package/app/public/fonts/nunito-latin-700-normal-irPkzGnT0r.woff2 +0 -0
package/app/app.vue
CHANGED
package/app/nuxt.config.ts
CHANGED
|
@@ -12,7 +12,7 @@ export default defineNuxtConfig({
|
|
|
12
12
|
modules: ['@nuxt/fonts', '@nuxt/content', isProd && '@nuxtjs/plausible', '@nuxt/ui'],
|
|
13
13
|
ui: {},
|
|
14
14
|
fonts: {
|
|
15
|
-
families: [{ name: '
|
|
15
|
+
families: [{ name: 'Inter' }],
|
|
16
16
|
defaults: {
|
|
17
17
|
weights: [400, 500, 600, 700],
|
|
18
18
|
},
|
package/app/tailwind.config.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Config } from 'tailwindcss'
|
|
2
|
-
import defaultTheme from 'tailwindcss/defaultTheme'
|
|
2
|
+
// import defaultTheme from 'tailwindcss/defaultTheme'
|
|
3
3
|
|
|
4
4
|
export default <Partial<Config>>{
|
|
5
5
|
// Without empty content block, first build without `.nuxt` dir fails
|
|
@@ -9,7 +9,19 @@ export default <Partial<Config>>{
|
|
|
9
9
|
theme: {
|
|
10
10
|
extend: {
|
|
11
11
|
fontFamily: {
|
|
12
|
-
sans: [
|
|
12
|
+
sans: [
|
|
13
|
+
// Inspired from Vitpress theme
|
|
14
|
+
'Inter',
|
|
15
|
+
'ui-sans-serif',
|
|
16
|
+
'system-ui',
|
|
17
|
+
'sans-serif',
|
|
18
|
+
'Apple Color Emoji',
|
|
19
|
+
'Segoe UI Emoji',
|
|
20
|
+
'Segoe UI Symbol',
|
|
21
|
+
'Noto Color Emoji',
|
|
22
|
+
],
|
|
23
|
+
mono: ['ui-monospace', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', 'monospace'],
|
|
24
|
+
custom: ['Inter'],
|
|
13
25
|
},
|
|
14
26
|
colors: {
|
|
15
27
|
yellow: {
|
package/app/utils/seo.ts
CHANGED
|
@@ -5,13 +5,18 @@ export interface PageMeta {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export function usePageSEO(page: PageMeta) {
|
|
8
|
-
if (!import.meta.server && !import.meta.dev) {
|
|
9
|
-
return
|
|
10
|
-
}
|
|
11
|
-
|
|
12
8
|
const route = useRoute()
|
|
13
9
|
const appConfig = useAppConfig()
|
|
14
10
|
|
|
11
|
+
useSeoMeta({
|
|
12
|
+
title: page.title,
|
|
13
|
+
description: page.description,
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
if (!(import.meta.server || import.meta.dev || import.meta.prerender)) {
|
|
17
|
+
return
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
const path = route.path === '/' ? '/_index' : route.path
|
|
16
21
|
const canonicalURL = import.meta.dev ? useRequestURL() : appConfig.site.url
|
|
17
22
|
const ogURL = new URL(`/_og${path}.png`, canonicalURL)
|
|
@@ -20,16 +25,7 @@ export function usePageSEO(page: PageMeta) {
|
|
|
20
25
|
ogURL.searchParams.set('title', page.ogTitle || page.title || appConfig.site.name)
|
|
21
26
|
ogURL.searchParams.set('description', page.description || appConfig.site.description || '')
|
|
22
27
|
|
|
23
|
-
if (import.meta.prerender) {
|
|
24
|
-
prerenderRoutes(ogURL.pathname + ogURL.search)
|
|
25
|
-
ogURL.searchParams.delete('name')
|
|
26
|
-
ogURL.searchParams.delete('title')
|
|
27
|
-
ogURL.searchParams.delete('description')
|
|
28
|
-
}
|
|
29
|
-
|
|
30
28
|
useSeoMeta({
|
|
31
|
-
title: page.title,
|
|
32
|
-
description: page.description,
|
|
33
29
|
ogImage: {
|
|
34
30
|
url: ogURL.href,
|
|
35
31
|
width: 1200,
|
|
@@ -44,4 +40,11 @@ export function usePageSEO(page: PageMeta) {
|
|
|
44
40
|
alt: page.description || appConfig.site.description,
|
|
45
41
|
},
|
|
46
42
|
})
|
|
43
|
+
|
|
44
|
+
if (import.meta.prerender) {
|
|
45
|
+
prerenderRoutes(ogURL.pathname + ogURL.search)
|
|
46
|
+
ogURL.searchParams.delete('name')
|
|
47
|
+
ogURL.searchParams.delete('title')
|
|
48
|
+
ogURL.searchParams.delete('description')
|
|
49
|
+
}
|
|
47
50
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|