mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
feat(v2): meta description (#1447)
* feat(v2): meta description * add description for blog as well * fix non-descriptive text link * remove font awesome * switch front-matter -> gray-matter
This commit is contained in:
parent
34195e4c30
commit
6136fbe1d2
21 changed files with 82 additions and 58 deletions
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
id: bar
|
||||
title: Bar
|
||||
description: This is custom description
|
||||
---
|
||||
|
||||
# Remarkable
|
||||
|
|
|
@ -39,6 +39,7 @@ describe('loadDocs', () => {
|
|||
sidebar: 'docs',
|
||||
source: path.join(docsDir, 'hello.md'),
|
||||
title: 'Hello, World !',
|
||||
description: `Hi, Endilie here :)`,
|
||||
});
|
||||
expect(docsMetadata['foo/bar']).toEqual({
|
||||
category: 'Test',
|
||||
|
@ -49,6 +50,7 @@ describe('loadDocs', () => {
|
|||
sidebar: 'docs',
|
||||
source: path.join(docsDir, 'foo', 'bar.md'),
|
||||
title: 'Bar',
|
||||
description: 'This is custom description',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,12 +40,14 @@ describe('processMetadata', () => {
|
|||
permalink: '/docs/foo/bar',
|
||||
source: path.join(docsDir, sourceA),
|
||||
title: 'Bar',
|
||||
description: 'This is custom description',
|
||||
});
|
||||
expect(dataB).toEqual({
|
||||
id: 'hello',
|
||||
permalink: '/docs/hello',
|
||||
source: path.join(docsDir, sourceB),
|
||||
title: 'Hello, World !',
|
||||
description: `Hi, Endilie here :)`,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -57,6 +59,7 @@ describe('processMetadata', () => {
|
|||
permalink: '/docs/endiliey/permalink',
|
||||
source: path.join(docsDir, source),
|
||||
title: 'Permalink',
|
||||
description: 'This has a different permalink',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue