Skip to content

fibo/github-pages-router

Repository files navigation

GitHub Pages Router

A client side router for GitHub Pages, with View Transitions API

Usage

Declare routes and links using ghp-* custom elements, for example

<ghp-router>
  <ghp-route route="./" content="./articles/overview.html"></ghp-route>
  <ghp-route route="./usage" content="./articles/usage.html"></ghp-route>

  <nav>
    <ghp-navlink>
      <a href="./">Overview</a>
    </ghp-navlink>

    <ghp-navlink>
      <a href="./usage">Usage</a>
    </ghp-navlink>
  </nav>

  <main>
    <!-- Content will be loaded here -->
  </main>
</ghp-router>

See documentation and examples here.

License

MIT

About

client side router for GitHub Pages, with transition API

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors