feat: 为各个页面补全标题与SEO
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m4s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m4s
This commit is contained in:
@ -12,6 +12,17 @@
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { t } = useI18n();
|
||||
|
||||
useHead(() => {
|
||||
const siteTitle = t('company-name');
|
||||
return {
|
||||
titleTemplate: (title) => (title ? `${title} - ${siteTitle}` : siteTitle),
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
display: flex;
|
||||
|
||||
@ -3,3 +3,14 @@
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { t } = useI18n();
|
||||
|
||||
useHead(() => {
|
||||
const siteTitle = `${$t('page-title.preview')} - ${t('company-name')}`;
|
||||
return {
|
||||
title: siteTitle,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user