mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 12:07:00 +02:00
feat: custom pages (#994)
This commit is contained in:
parent
7d4d9fe961
commit
8691a2525c
25 changed files with 263 additions and 128 deletions
21
v2/lib/theme/Pages/index.js
Normal file
21
v2/lib/theme/Pages/index.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* eslint-disable */
|
||||
import React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import Helmet from 'react-helmet';
|
||||
import Layout from '@theme/Layout'; // eslint-disable-line
|
||||
|
||||
export default class Pages extends React.Component {
|
||||
render() {
|
||||
const {metadata, children, siteConfig} = this.props;
|
||||
const {language} = metadata;
|
||||
return (
|
||||
<Layout {...this.props}>
|
||||
<Helmet defaultTitle={siteConfig.title}>
|
||||
{language && <html lang={language} />}
|
||||
{language && <meta name="docsearch:language" content={language} />}
|
||||
</Helmet>
|
||||
{children}
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue