Render page markdown

pull/1657/head
Kamran Ahmed 5 years ago
parent 0970485ff0
commit 208fbdfbf4
  1. 8
      components/detailed-roadmap/index.js

@ -8,6 +8,7 @@ import { getFacebookShareUrl } from 'lib/url';
import { ShareIcon } from 'components/share-icon';
import { getRedditShareUrl, getTwitterShareUrl } from 'lib/url';
import siteConfig from "storage/site";
import MdRenderer from '../md-renderer';
const DetailedRoadmap = ({ roadmap }) => {
const [menuActive, setMenuState] = useState(false);
@ -45,6 +46,9 @@ const DetailedRoadmap = ({ roadmap }) => {
);
});
const filePath = currentPage.path.replace(/^\//, '');
const RoadmapContent = require(`../../storage/${filePath}`).default;
return (
<SummaryContainer>
<PageHeader className="border-top border-bottom text-center text-md-left">
@ -93,7 +97,9 @@ const DetailedRoadmap = ({ roadmap }) => {
{ roadmapPages }
</Sidebar>
<div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut beatae blanditiis commodi, consequatur, dicta distinctio esse et id, ipsa labore libero nisi odit placeat possimus saepe sed vel vitae voluptate?</p>
<MdRenderer>
<RoadmapContent />
</MdRenderer>
</div>
</Summary>
</SummaryContainer>

Loading…
Cancel
Save