Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add base URL to preview
  • Loading branch information
frobinsonj committed Feb 17, 2023
1 parent 8280200 commit c28f682
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.mjs
Expand Up @@ -335,7 +335,7 @@ async function savePageAndResources(url, html, $) {
// write preview index page
const dir = `${output}/preview${url}`
ensureDirExists(dir)
html = html.replace(regexEmail, 'Licensed User')
html = html.replace(regexEmail, 'Licensed User').replace('<head>', '<head>\n<base href="https://pages.teamhydra.io/Team-Hydra/Tailwind/" />')
fs.writeFileSync(`${dir}/index.html`, html)
console.log(`📝 Writing ${url}/index.html`)
}
Expand Down
4 changes: 2 additions & 2 deletions previewindex.html
Expand Up @@ -2,10 +2,10 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0;URL='/components/'" />
<meta http-equiv="refresh" content="0;URL='./components/'" />
<title>Tailwind UI Preview</title>
</head>
<body>
<a href="/components/">View Components</a>
<a href="./components/">View Components</a>
</body>
</html>

0 comments on commit c28f682

Please sign in to comment.