Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display product titles without suffix #767

Merged
merged 8 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/web/composables/useProduct/useProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ export const useProduct: UseProductReturn = (slug) => {
* @description Function for setting product title meta data
*/
const setProductMeta = () => {
const title = productGetters.getName(state.value.data);
const { titleSuffix } = useAppConfig();

const title =
productGetters.getTitle(state.value.data) || `${productGetters.getName(state.value.data)} | ${titleSuffix}`;

useHead({
title,
titleTemplate: '',
meta: [
{
name: 'description',
Expand Down
1 change: 0 additions & 1 deletion apps/web/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<script setup lang="ts">
import type { DefaultLayoutProps } from '~/layouts/types';
defineProps<DefaultLayoutProps>();
usePageTitle();
const { setLogoMeta } = useStructuredData();
const { isOpen, product } = useQuickCheckout();
const viewport = useViewport();
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Implement new notification design
- Adding the ability to have alt text for images.
- It's now possible to change the font color of the hero banner via a template property.
- Display product titles without global suffix when available, maintaining backward compatibility.

### 🩹 Fixed

Expand Down
Loading