mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -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 TopLevelGroup from '../../TopLevelGroup';
|
||||
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';
|
||||
|
||||
interface SearchEnginePreviewProps {
|
||||
|
@ -22,7 +22,8 @@ const SearchEnginePreview: React.FC<SearchEnginePreviewProps> = ({
|
|||
|
||||
return (
|
||||
<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='basis-'>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -108,7 +111,7 @@ const Metadata: React.FC<{ keywords: string[] }> = ({keywords}) => {
|
|||
onEditingChange={handleEditingChange}
|
||||
onSave={handleSave}
|
||||
>
|
||||
{isEditing &&
|
||||
{!isEditing &&
|
||||
<>
|
||||
<SearchEnginePreview
|
||||
description={metaDescription ? metaDescription : siteDescription}
|
||||
|
@ -116,6 +119,10 @@ const Metadata: React.FC<{ keywords: string[] }> = ({keywords}) => {
|
|||
title={metaTitle ? metaTitle : siteTitle}
|
||||
url={siteData?.url}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
{isEditing &&
|
||||
<>
|
||||
{inputFields}
|
||||
</>
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue