mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Reorganized and improved meta data settings so it's easier to parse DES-159
refs DES-159
This commit is contained in:
parent
e3d01e0b1f
commit
50770d20b1
1 changed files with 32 additions and 25 deletions
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import TopLevelGroup from '../../TopLevelGroup';
|
import TopLevelGroup from '../../TopLevelGroup';
|
||||||
import useSettingGroup from '../../../hooks/useSettingGroup';
|
import useSettingGroup from '../../../hooks/useSettingGroup';
|
||||||
import {GoogleLogo, Heading, Icon, SettingGroupContent, TextField, withErrorBoundary} from '@tryghost/admin-x-design-system';
|
import {GoogleLogo, Icon, SettingGroupContent, TextField, withErrorBoundary} from '@tryghost/admin-x-design-system';
|
||||||
import {getSettingValues} from '@tryghost/admin-x-framework/api/settings';
|
import {getSettingValues} from '@tryghost/admin-x-framework/api/settings';
|
||||||
|
|
||||||
interface SearchEnginePreviewProps {
|
interface SearchEnginePreviewProps {
|
||||||
|
@ -22,7 +22,8 @@ const SearchEnginePreview: React.FC<SearchEnginePreviewProps> = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Heading grey={true} level={6}>Search engine result preview</Heading>
|
<div className='-mx-5 -mb-5 overflow-hidden rounded-b-xl bg-grey-50 px-5 pt-5 dark:bg-grey-950 md:-mx-7 md:-mb-7 md:px-7 md:pt-7'>
|
||||||
|
<div className='rounded-t-sm bg-white px-5 py-3 shadow-lg dark:bg-grey-975'>
|
||||||
<div className='mt-3 flex items-center'>
|
<div className='mt-3 flex items-center'>
|
||||||
<div className='basis-'>
|
<div className='basis-'>
|
||||||
<GoogleLogo className='mr-7 h-7' />
|
<GoogleLogo className='mr-7 h-7' />
|
||||||
|
@ -49,6 +50,8 @@ const SearchEnginePreview: React.FC<SearchEnginePreviewProps> = ({
|
||||||
<span className='text-sm text-grey-900 dark:text-grey-700'>{description}</span>
|
<span className='text-sm text-grey-900 dark:text-grey-700'>{description}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -108,7 +111,7 @@ const Metadata: React.FC<{ keywords: string[] }> = ({keywords}) => {
|
||||||
onEditingChange={handleEditingChange}
|
onEditingChange={handleEditingChange}
|
||||||
onSave={handleSave}
|
onSave={handleSave}
|
||||||
>
|
>
|
||||||
{isEditing &&
|
{!isEditing &&
|
||||||
<>
|
<>
|
||||||
<SearchEnginePreview
|
<SearchEnginePreview
|
||||||
description={metaDescription ? metaDescription : siteDescription}
|
description={metaDescription ? metaDescription : siteDescription}
|
||||||
|
@ -116,6 +119,10 @@ const Metadata: React.FC<{ keywords: string[] }> = ({keywords}) => {
|
||||||
title={metaTitle ? metaTitle : siteTitle}
|
title={metaTitle ? metaTitle : siteTitle}
|
||||||
url={siteData?.url}
|
url={siteData?.url}
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
{isEditing &&
|
||||||
|
<>
|
||||||
{inputFields}
|
{inputFields}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue