Skip to content

Instantly share code, notes, and snippets.

@saitonakamura
Last active February 19, 2018 21:09
Show Gist options
  • Save saitonakamura/acc250e15900f14cc32818ab17e53374 to your computer and use it in GitHub Desktop.
Save saitonakamura/acc250e15900f14cc32818ab17e53374 to your computer and use it in GitHub Desktop.
Next.js on Github Pages link example
import Link from 'next/link'
export default () => (
<div>
<Link href="/page1" as={`${process.env.ASSET_PREFIX}/page1`}>
<a>Go to page</a>
</Link>
Root page
</div>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment