mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-26 21:18:47 +02:00
feat(v2): rewrite docs loading strategy (#1092)
* feat(v2): rewrite docs loading strategy * Prettify * Lint * Allow resolving from library root * minor changes, refactor * copyright header
This commit is contained in:
parent
c9243e8922
commit
13a21b2374
36 changed files with 520 additions and 327 deletions
|
@ -5,12 +5,17 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import React, {useContext} from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
import DocusaurusContext from '@docusaurus/context';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function Footer(props) {
|
||||
function Footer() {
|
||||
const context = useContext(DocusaurusContext);
|
||||
const {pagesMetadatas} = context;
|
||||
|
||||
return (
|
||||
<footer className={styles.footer}>
|
||||
<section className={styles.footerRow}>
|
||||
|
@ -78,7 +83,7 @@ function Footer(props) {
|
|||
<div className={styles.footerColumn}>
|
||||
<h3 className={styles.footerColumnTitle}>Pages</h3>
|
||||
<ul className={styles.footerList}>
|
||||
{props.pagesMetadatas.map(metadata => (
|
||||
{pagesMetadatas.map(metadata => (
|
||||
<li key={metadata.permalink} className={styles.footerListItem}>
|
||||
<Link className={styles.footerLink} to={metadata.permalink}>
|
||||
{metadata.permalink}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue