Skip to content

Commit b62a8d2

Browse files
feat: add toc + lint
1 parent dac1d77 commit b62a8d2

31 files changed

+331
-185
lines changed

.playground/content/0.index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ featured categories: your ultimate guide to exploring the subjects
2020
that matter to you
2121

2222
#links
23-
:::tag-link{to="#categories"}
23+
:::tag-link{to="/categories"}
2424
All Categories
2525
:::
2626

@@ -58,11 +58,11 @@ Latest posts
5858
Stay informed with our latest posts: a curated selection of the freshest and most relevant content on our blog
5959

6060
#links
61-
:::tag-link{to="#articles"}
61+
:::tag-link{to="/blog"}
6262
All Articles
6363
:::
6464

65-
:::tag-link{to="#categories"}
65+
:::tag-link{to="/categories"}
6666
All Categories
6767
:::
6868
::

.playground/content/1.blog/2022-08-23-personal-development-and-confidence.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Personal Development and Confidence in Business Environments
44
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Et nemo nimium beatus est; Idemne, quod iucunde? Duo Reges constructio interrete. At iamdecimum annum in spelunca iacet.
55
author: /authors/irina-kropova
66
publishDate: 2022-08-28T00:00:00.000Z
7-
featured: true
87
image: /img/posts/4.png
98
cover: /img/posts/4.png
109
category: /categories/coaching

.playground/content/1.blog/2022-08-28-backend-development-and-rest-api.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Backend Development and REST APIs when working with Headless CMS
44
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Et nemo nimium beatus est; Idemne, quod iucunde? Duo Reges constructio interrete. At iamdecimum annum in spelunca iacet.
55
author: /authors/clark-smith
66
publishDate: 2022-08-28T00:00:00.000Z
7-
featured: true
87
image: /img/posts/5.png
98
cover: /img/posts/5.png
109
category: /categories/coaching

.playground/content/1.blog/2022-09-11-determining-the-right-direction.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Determining the right direction when working on a graphical or web projec
44
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Et nemo nimium beatus est; Idemne, quod iucunde? Duo Reges constructio interrete. At iamdecimum annum in spelunca iacet.
55
author: /authors/wallace-knolder
66
publishDate: 2022-09-11T00:00:00.000Z
7-
featured: true
87
image: /img/posts/10.png
98
cover: /img/posts/10.png
109
category: /categories/coaching

.playground/content/1.blog/2023-01-10-state-of-ux.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ featured: false
88
image: /img/posts/2.png
99
cover: /img/posts/2.png
1010
category: /categories/ux-design
11+
toc: true
1112
tags:
1213
- ui & ux
1314
- design

.playground/content/11.privacy.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: Our policy regarding information collection and use
55
publishDate: 2022-08-08T00:00:00.000Z
66
cover: /illustrations/scenes/draw-1.svg
77
navigation: false
8+
toc: true
89
---
910

1011
## Privacy Policy

.playground/content/2.test.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Latest posts
2424
Stay informed with our latest posts: a curated selection of the freshest and most relevant content on our blog
2525

2626
#links
27-
:::tag-link{to="#articles"}
27+
:::tag-link{to="/blog"}
2828
All Articles
2929
:::
3030

31-
:::tag-link{to="#categories"}
31+
:::tag-link{to="/categories"}
3232
All Categories
3333
:::
3434
::
@@ -43,7 +43,7 @@ featured categories: your ultimate guide to exploring the subjects
4343
that matter to you
4444

4545
#links
46-
:::tag-link{to="#categories"}
46+
:::tag-link{to="/categories"}
4747
All Categories
4848
:::
4949

.playground/content/4.authors/irina-kropova.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
layout: blog-author
22
title: Irina Kropova
33
description: Lifestyle Coach
4+
featured: true
45
image: /img/avatars/small/9.svg
56
contact:
67
- name: Email

.playground/content/5.about.md

+46-47
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ title: About
55

66
::about-hero
77
---
8-
title: Hi, Iam Maya Piretti
9-
subtitle: UI/UX DESIGNER, DEVELOPER
108
image: /img/illustrations/maya-full.svg
11-
---
9+
---
1210
Hello, my name is Maya Piretti and I am a UI/er with 5 years of experience in creating intuitive and user-friendly digital products.
11+
12+
#title
13+
Hi, Iam Maya Piretti
14+
15+
#subtitle
16+
UI/UX DESIGNER, DEVELOPER
1317
::
1418

1519
::container-sidebar{prose-class="prose-md"}
@@ -138,58 +142,52 @@ challenges.
138142

139143
:::sidebar-text-list
140144
::sidebar-text-list-item
141-
---
142-
title: Experience
143-
subtitle: 5+ years of experience
144-
---
145+
#title
146+
Experience
147+
148+
#subtitle
149+
5+ years of experience
145150
::
146151
::sidebar-text-list-item
147-
---
148-
title: Role
149-
subtitle: UI/UX Designer
150-
---
152+
#title
153+
Role
154+
155+
#subtitle
156+
UI/UX Designer
151157
::
152158
::sidebar-text-list-item
153-
---
154-
title: Work status
155-
subtitle: Freelance
156-
---
159+
#title
160+
Work status
161+
162+
#subtitle
163+
Freelance
157164
::
158165
:::
159166

160167
:separator
161168

162-
:::sidebar-icon-list{title="Main skills"}
163-
::sidebar-icon-list-item
164-
---
165-
title: Sketch
166-
icon: logos:sketch
167-
---
168-
::
169-
::sidebar-icon-list-item
170-
---
171-
title: Zeplin
172-
icon: logos:zeplin
173-
---
174-
::
175-
::sidebar-icon-list-item
176-
---
177-
title: Figma
178-
icon: logos:figma
179-
---
180-
::
181-
::sidebar-icon-list-item
182-
---
183-
title: HTML5
184-
icon: logos:html-5
185-
---
186-
::
187-
::sidebar-icon-list-item
188-
---
189-
title: CSS3
190-
icon: logos:css-3
191-
---
169+
:::sidebar-icon-list{title="Skills"}
170+
::sidebar-icon-list-item{icon="logos:sketch"}
171+
#title
172+
Sketch
173+
::
174+
::sidebar-icon-list-item{icon="logos:zeplin"}
175+
#title
176+
Zeplin
177+
::
178+
::sidebar-icon-list-item{icon="logos:figma"}
179+
#title
180+
Figma
192181
::
182+
::sidebar-icon-list-item{icon="logos:html-5"}
183+
#title
184+
HTML5
185+
::
186+
::sidebar-icon-list-item{icon="logos:css-3"}
187+
#title
188+
CSS3
189+
::
190+
193191
:::
194192

195193
:separator
@@ -210,8 +208,9 @@ challenges.
210208
title: UI/UX Designer
211209
subtitle: Freelance · 5 years exp
212210
image: /img/illustrations/maya-small.svg
213-
actionLabel: Hire me now
214-
actionLink: mailto:maya.piretti@cssninja.io
211+
action:
212+
text: Hire me now
213+
to: mailto:maya.piretti@cssninja.io
215214
---
216215
:::
217216

.prettierrc.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ module.exports = {
33
useTabs: false,
44
semi: false,
55
singleQuote: true,
6+
htmlWhitespaceSensitivity: 'ignore',
67
}

components/ArticleAuthorBadge.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ const props = defineProps<{
55
path: string
66
}>()
77
8-
const { data: author } = await useAsyncData(() =>
8+
const { data: author } = await useAsyncData(`author-meta-${props.path}`, () =>
99
queryContent<AuthorParsedContent>()
10-
.only(['_path', 'title'])
10+
.only(['_path', 'image', 'title'])
1111
.where({ layout: 'blog-author', _path: props.path })
1212
.findOne()
1313
)

components/ArticleCard.vue

+10-11
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ const { formatDate } = useDateFormatter()
99
1010
const image = computed(() => props.article.image || props.article.cover)
1111
12-
const { data: author } = await useAsyncData(() =>
13-
!props.article.author
14-
? Promise.resolve(null)
15-
: queryContent<AuthorParsedContent>()
16-
.only(['_path', 'image', 'title'])
17-
.where({ layout: 'blog-author', _path: props.article.author })
18-
.findOne()
12+
const { data: author } = await useAsyncData(
13+
`author-meta-${props.article.author}`,
14+
() =>
15+
!props.article.author
16+
? Promise.resolve(null)
17+
: queryContent<AuthorParsedContent>()
18+
.only(['_path', 'image', 'title'])
19+
.where({ layout: 'blog-author', _path: props.article.author })
20+
.findOne()
1921
)
2022
</script>
2123

@@ -59,10 +61,7 @@ const { data: author } = await useAsyncData(() =>
5961
</p>
6062
<div class="flex items-center justify-between">
6163
<div>
62-
<span
63-
v-if="author"
64-
class="flex items-center leading-tight"
65-
>
64+
<span v-if="author" class="flex items-center leading-tight">
6665
<img
6766
v-if="author.image"
6867
:src="author.image"

components/ArticleCardSummaryLarge.vue

+10-11
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ const { formatDate } = useDateFormatter()
99
1010
const image = computed(() => props.article.image || props.article.cover)
1111
12-
const { data: author } = await useAsyncData(() =>
13-
!props.article.author
14-
? Promise.resolve(null)
15-
: queryContent<AuthorParsedContent>()
16-
.only(['_path', 'image', 'title'])
17-
.where({ layout: 'blog-author', _path: props.article.author})
18-
.findOne()
12+
const { data: author } = await useAsyncData(
13+
`author-meta-${props.article.author}`,
14+
() =>
15+
!props.article.author
16+
? Promise.resolve(null)
17+
: queryContent<AuthorParsedContent>()
18+
.only(['_path', 'image', 'title'])
19+
.where({ layout: 'blog-author', _path: props.article.author })
20+
.findOne()
1921
)
2022
</script>
2123

@@ -56,10 +58,7 @@ const { data: author } = await useAsyncData(() =>
5658
</div>
5759
<div class="flex items-center justify-between">
5860
<div>
59-
<span
60-
v-if="author"
61-
class="flex items-center leading-tight"
62-
>
61+
<span v-if="author" class="flex items-center leading-tight">
6362
<img
6463
v-if="author.image"
6564
:src="author.image"

components/ArticleCardSummarySmall.vue

+11-9
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ const { formatDate } = useDateFormatter()
99
1010
const image = computed(() => props.article.image || props.article.cover)
1111
12-
const { data: author } = await useAsyncData(() =>
13-
!props.article.author
14-
? Promise.resolve(null)
15-
: queryContent<AuthorParsedContent>()
16-
.only(['_path', 'image', 'title'])
17-
.where({ layout: 'blog-author', _path: props.article.author })
18-
.findOne()
12+
const { data: author } = await useAsyncData(
13+
`author-meta-${props.article.author}`,
14+
() =>
15+
!props.article.author
16+
? Promise.resolve(null)
17+
: queryContent<AuthorParsedContent>()
18+
.only(['_path', 'image', 'title'])
19+
.where({ layout: 'blog-author', _path: props.article.author })
20+
.findOne()
1921
)
2022
</script>
2123

@@ -65,8 +67,8 @@ const { data: author } = await useAsyncData(() =>
6567
<div>
6668
<h4 class="font-sans text-xs text-muted-800 dark:text-muted-100">
6769
<NuxtLink :to="author._path">
68-
{{ author.title }}
69-
</NuxtLink>
70+
{{ author.title }}
71+
</NuxtLink>
7072
</h4>
7173
</div>
7274
</span>

components/ArticleCategoryBadge.vue

+11-7
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22
import type { CategoryParsedContent } from '../types'
33
44
const props = defineProps<{
5-
path: string
5+
path?: string
66
}>()
77
8-
const { data: category } = await useAsyncData(() =>
9-
queryContent<CategoryParsedContent>()
10-
.only(['_path', 'title'])
11-
.where({ layout: 'blog-category', _path: props.path })
12-
.findOne()
8+
const { data: category } = await useAsyncData(
9+
`category-meta-${props.path}`,
10+
() =>
11+
!props.path
12+
? Promise.resolve(null)
13+
: queryContent<CategoryParsedContent>()
14+
.only(['_path', 'title'])
15+
.where({ layout: 'blog-category', _path: props.path })
16+
.findOne()
1317
)
1418
</script>
1519

1620
<template>
1721
<div v-if="category" class="flex flex-row flex-wrap items-start gap-2">
18-
<NuxtLink
22+
<NuxtLink
1923
:to="category._path"
2024
class="inline-block font-sans text-xs text-white py-1 px-3 rounded-full bg-primary-500 shadow-lg shadow-primary-500/20"
2125
>

components/ArticleGrid.vue

+9-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ const { formatDate } = useDateFormatter()
99
1010
const image = computed(() => props.article.image || props.article.cover)
1111
12-
const { data: author } = await useAsyncData(() =>
13-
!props.article._path
14-
? Promise.resolve(null)
15-
: queryContent<AuthorParsedContent>()
16-
.only(['_path', 'image', 'title'])
17-
.where({ layout: 'blog-author', _path: props.article._path })
18-
.findOne()
12+
const { data: author } = await useAsyncData(
13+
`author-meta-${props.article.author}`,
14+
() =>
15+
!props.article.author
16+
? Promise.resolve(null)
17+
: queryContent<AuthorParsedContent>()
18+
.only(['_path', 'image', 'title'])
19+
.where({ layout: 'blog-author', _path: props.article.author })
20+
.findOne()
1921
)
2022
</script>
2123

0 commit comments

Comments
 (0)