Skip to content

Commit

Permalink
feat: display product titles without suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
doproiescu-plenty committed Oct 30, 2024
1 parent 1f1aa75 commit 2ae9ae3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
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 @@ -15,6 +15,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

0 comments on commit 2ae9ae3

Please sign in to comment.