Use Rollup to build JS for docs
This commit is contained in:
committed by
Justin Fagnani
parent
12d60c07dd
commit
fe5a424bee
@@ -21,7 +21,7 @@ const renderExample = ({name, content, collections, page}) => {
|
||||
? ''
|
||||
: collections.example.map((post) => `
|
||||
<li class=${post.url === page.url ? 'selected' : ''}>
|
||||
<a href="/docs${post.url}">${ post.data.description.replace('<', '<') }</a>
|
||||
<a href="${post.url}">${ post.data.description.replace('<', '<') }</a>
|
||||
</li>
|
||||
`).join('')}
|
||||
</ul>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module.exports = function(data) {
|
||||
return `
|
||||
<nav>
|
||||
<a href="/docs/">Home</a>
|
||||
<a href="/docs/examples/">Examples</a>
|
||||
<a href="/docs/api/">API</a>
|
||||
<a href="/docs/install/">Install</a>
|
||||
<a href="/">Home</a>
|
||||
<a href="/examples/">Examples</a>
|
||||
<a href="/api/">API</a>
|
||||
<a href="/install/">Install</a>
|
||||
</nav>`;
|
||||
};
|
||||
|
||||
@@ -11,10 +11,10 @@ module.exports = function(data) {
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>${data.title}</title>
|
||||
<link rel="stylesheet" href="/docs/docs.css">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600|Roboto+Mono">
|
||||
<link href="/node_modules/prismjs/themes/prism-okaidia.css" rel="stylesheet" />
|
||||
<script type="module" src="/my-element.js"></script>
|
||||
<link href="/prism-okaidia.css" rel="stylesheet" />
|
||||
<script type="module" src="/my-element.bundled.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
${header()}
|
||||
|
||||
Reference in New Issue
Block a user