Skip to content

Commit

Permalink
feat: add title
Browse files Browse the repository at this point in the history
  • Loading branch information
gjssss committed Feb 27, 2024
1 parent 0ba2a62 commit 9dd9277
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 6 deletions.
4 changes: 2 additions & 2 deletions assets/markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
position: relative;

code span {
font-family: 'Noto Sans Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
'Courier New', monospace;
font-family: 'Noto Sans Mono', ui-monospace, SFMono-Regular, Menlo, Monaco,
Consolas, 'Liberation Mono', 'Courier New', monospace;
}
}

Expand Down
2 changes: 1 addition & 1 deletion components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { data: navigation } = await useAsyncData('nav', async () => {
<NuxtLink v-for="item in navigation" :key="item._id" :href="item._path">
{{ item.title }}
</NuxtLink>
<NuxtLink href="/resume">
<NuxtLink href="/resume" target="_blank">
简历
</NuxtLink>
<nuxt-link to="https://github.com/gjssss" target="_blank">
Expand Down
2 changes: 1 addition & 1 deletion components/content/ProsePre.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function showMsg() {
<div v-if="copyTrigger" class="copy">
{{ copyMsg }}
</div>
<div v-else class="i-carbon-copy copy op-trans" title="copy code" @click="copyHandle" />
<div v-else class="copy op-trans i-carbon-copy" title="copy code" @click="copyHandle" />
<pre :class="$props.class" class="font-mono"><slot /></pre>
</div>
</template>
Expand Down
4 changes: 3 additions & 1 deletion layouts/resume.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<script setup lang="ts">
useHead({
title: 'GJSSSS | 简历',
})
</script>

<template>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@iconify-json/twemoji": "^1.1.15",
"@nuxtjs/color-mode": "^3.3.2",
"@pinia/nuxt": "^0.5.1",
"@shikijs/twoslash": "^1.1.7",
"@types/lodash-es": "^4.17.12",
"@unocss/eslint-config": "^0.58.5",
"@unocss/nuxt": "^0.58.5",
Expand Down
6 changes: 5 additions & 1 deletion pages/[...path].vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ const route = useRoute()
const paths = (route.params as any).path || ['']
paths.unshift('')
const path = paths.join('/')
const { data, error } = useAsyncData(path, () => queryContent(path).findOne())
const { data, error } = await useAsyncData(path, () => queryContent(path).findOne())
useHead({
title: data.value?.title ? `GJSSSS | ${data.value.title}` : 'GJSSSS',
})
</script>

<template>
Expand Down
41 changes: 41 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9dd9277

Please sign in to comment.