mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-29 17:07:08 +02:00
feat(v2): implement theme component overriding (#1435)
* feat(v2): implement component overriding * siteDir theme overriding should work for > 1 level directory * fallback for essential component like Loading * rename default -> classic
This commit is contained in:
parent
1697f9cebb
commit
eedd4c481c
38 changed files with 529 additions and 202 deletions
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import Layout from '@theme/Layout'; // eslint-disable-line
|
||||
import BlogPostItem from '@theme/BlogPostItem';
|
||||
|
||||
function BlogListPage(props) {
|
||||
const {
|
||||
metadata: {posts = []},
|
||||
entries: BlogPosts,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<Layout title="Blog">
|
||||
<div className="container margin-vert--xl">
|
||||
<div className="row">
|
||||
<div className="col col--6 col--offset-3">
|
||||
{BlogPosts.map((PostContent, index) => (
|
||||
<div className="margin-bottom--xl" key={index}>
|
||||
<BlogPostItem truncated metadata={posts[index]}>
|
||||
<PostContent />
|
||||
</BlogPostItem>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export default BlogListPage;
|
Loading…
Add table
Add a link
Reference in a new issue