mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-28 14:08:21 +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
|
@ -12,13 +12,7 @@ import Link from '@docusaurus/Link'; // eslint-disable-line
|
|||
import './styles.css';
|
||||
|
||||
function DocSidebar(props) {
|
||||
const {docsMetadata, location} = props;
|
||||
|
||||
const id =
|
||||
docsMetadata.permalinkToId[location.pathname] ||
|
||||
docsMetadata.permalinkToId[location.pathname.replace(/\/$/, '')];
|
||||
const metadata = docsMetadata.docs[id] || {};
|
||||
const {sidebar} = metadata;
|
||||
const {docsMetadata, sidebar} = props;
|
||||
|
||||
if (!sidebar) {
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue