Skip to content

Instantly share code, notes, and snippets.

@ianstormtaylor
Created August 10, 2013 04:12
Show Gist options
  • Save ianstormtaylor/6199025 to your computer and use it in GitHub Desktop.
Save ianstormtaylor/6199025 to your computer and use it in GitHub Desktop.
Easily make a GitHub pages site from the Readme file of a repo.
{
"name": "my-repo",
"dependencies": {
"chjj/marked": "*"
},
"scripts": ["index.js"],
"templates": ["Readme.md"]
}
<html>
<head>
<link rel="stylesheet" href="build/build.css">
</head>
<body>
<script src="build/build.js"></script>
</body>
</html>
var readme = require('./Readme.md');
var marked = require('marked');
document.body.innerHTML = marked(readme);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment