1.0.10 • Published 7 years ago
phd v1.0.10
What is PHD?
Automatically generate a static site from your repo's README.md and make it dynamic.
Install
npm install --save-dev phd
Usage
Step 1. Create phd.config.js
Create a phd.config.js
JS file to define a phd config object.
module.exports = [{
input: ["README.md"],
output: "index.html",
js: ["https://www.celljs.org/cell.js"],
css: [
"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css",
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/grayscale.min.css",
"https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700",
"https://fonts.googleapis.com/css?family=Merriweather:900",
"./website/style.css"
],
init: function() {
/**
* Do whatever JS initialization you need
*/
}
}]
Step 2. Run
node phd
Syntax
module.exports = {
input: Array,
output: String,
js: Array,
css: Array,
init: Function
}
attribute | description |
---|---|
input | an array of markdown file paths in the current repository |
output | a string of output filename |
js | an array of JavaScript URLs |
css | an array of CSS URLs |
init | an initializier function that will run onload |
Customization
TBD