benjycui / bisheng

Transform Markdown(and other static files with transformers) into a SPA website using React.
MIT License
2.9k stars 419 forks source link

feat: css hash, fix: auto hash entrypoint #191

Closed ycjcl868 closed 5 years ago

ycjcl868 commented 5 years ago

Usage

// bisheng.config.js

module.exports = {
    ...
    hash: true,
    ...
}
// user-defined template template.html
<head>
 {% for cssFile in manifest["css"] %}<link rel="stylesheet" type="text/css" href="{{ root }}{{ cssFile }}"/>
 {% endfor %}
</head>

<body>
...
   {% for jsFile in manifest["js"] %}<script src="{{ root }}{{ jsFile }}"></script>
   {% endfor %}
...
</body>