Skip to content

Commit

Permalink
feat: handle site_title with \n
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Jun 18, 2024
1 parent 91710e2 commit eca0817
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/SiteSettingsExtras/SiteSettingsExtras.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { Helmet } from '@plone/volto/helpers';
import { SiteProperty } from 'volto-site-settings';

const SiteSettingsExtras = (props) => {
const siteTitle = SiteProperty({ property: 'site_title', getValue: true });
let siteTitle = SiteProperty({ property: 'site_title', getValue: true });
const favicon = SiteProperty({
property: 'site_favicon',
defaultValue: '/favicon.ico',
getValue: true,
});

siteTitle = siteTitle.replaceAll('\\n', ' - ');

return (
<>
<Helmet titleTemplate={`%s - ${siteTitle}`} />
Expand Down

0 comments on commit eca0817

Please sign in to comment.