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:
Endi 2019-05-10 22:37:56 +07:00 committed by GitHub
parent 34195e4c30
commit 6136fbe1d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 82 additions and 58 deletions

View file

@ -1,6 +1,7 @@
---
id: bar
title: Bar
description: This is custom description
---
# Remarkable

View file

@ -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',
});
});
});

View file

@ -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',
});
});
});