Summary: alicelieutier graciously contributed this React component to savagely include the HTML from the man pages into docusaurus. Now they render like the rest of the documentation! Reviewed By: cristianoc Differential Revision: D22050580 fbshipit-source-id: e8e314109master
parent
6ba956d95d
commit
2a168991be
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer-analyze
|
||||||
|
title: infer analyze
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer-analyze.1.html" />
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer-capture
|
||||||
|
title: infer capture
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer-capture.1.html" />
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer-compile
|
||||||
|
title: infer compile
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer-compile.1.html" />
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer-explore
|
||||||
|
title: infer explore
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer-explore.1.html" />
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer-help
|
||||||
|
title: infer help
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer-help.1.html" />
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer-report
|
||||||
|
title: infer report
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer-report.1.html" />
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer-reportdiff
|
||||||
|
title: infer reportdiff
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer-reportdiff.1.html" />
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer-run
|
||||||
|
title: infer run
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer-run.1.html" />
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
id: man-infer
|
||||||
|
title: infer
|
||||||
|
---
|
||||||
|
|
||||||
|
import HtmlWrap from "../src/components/HtmlWrap";
|
||||||
|
|
||||||
|
<HtmlWrap url="/man/next/infer.1.html" />
|
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React, { useState, useEffect } from 'react';
|
||||||
|
|
||||||
|
export default function HtmlWrap({ url }) {
|
||||||
|
const [html, setHTML] = useState({__html: ''});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
fetch(url)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(html => setHTML({__html: html}))
|
||||||
|
}, [url]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div dangerouslySetInnerHTML={html}></div>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in new issue