How do I load a markdown file into a react component?

A full working example with react-markdown: import React, { Component } from ‘react’ import ReactMarkdown from ‘react-markdown’ import termsFrPath from ‘./Terms.fr.md’ class Terms extends Component { constructor(props) { super(props) this.state = { terms: null } } componentWillMount() { fetch(termsFrPath).then((response) => response.text()).then((text) => { this.setState({ terms: text }) }) } render() { return ( <div className=”content”> … Read more

How to format Swagger 2.0 text descriptions?

Markdown is supported in the Swagger Editor. Below is an example of using Markdown in an OpenAPI (Swagger) document: swagger: ‘2.0’ info: version: 0.0.0 title: Markdown description: | # Heading Text attributes _italic_, *italic*, __bold__, **bold**, `monospace`. Horizontal rule: — Bullet list: * apples * oranges * pears Numbered list: 1. apples 2. oranges 3. … Read more

How to embed a video into GitHub README.md?

Add a url to video file in your ReadMe. Github now supports videos, see more detailed answer here: https://stackoverflow.com/a/4279746/1092815 You can see a live example here (See at the end of the readme): https://github.com/alelievr/Mixture/blob/0.4.0/README.md Github Pages I strongly recommend placing the video in a project website created with GitHub Pages instead of the readme, like … Read more

How can I embed a YouTube video on GitHub wiki pages?

It’s not possible to embed videos directly, but you can put an image which links to a YouTube video: [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](https://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE) For more information about Markdown look at this Markdown cheatsheet on GitHub. For more information about Youtube image links look this question.