very simple page, but got 404
sqllyw opened this issue · comments
Hi,
Totally new to pages.js, trying to make a simple page work, sample is here
click 'about', but got 404, any idea? thanks
<p></p>
<a href="">Home</a>
<a href="">Contact Me</a>
<a href="./about">About</a>
<script>
page.base('');
page('/about', about);
function about() {
document.querySelector('p')
.textContent = 'viewing about';
}
</script>
put this in head:
<base href="/" >
add page() in code:
page.base('');
page('/about', about);
page(); // add this
function about() {
document.querySelector('p')
.textContent = 'viewing about';
}