Skip to content

nervaccio/nextjs-react-foundations

Repository files navigation

NextJS tutorial - React foundations

The tutorial can be found at: https://nextjs.org/learn/react-foundations

9/9 Completed

Custom config for Github pages deploy

// Chapter-09_Installing Next.js/next.config.js
/**
 * @type {import('next').NextConfig}
 */
const nextConfig = {
    output: 'export',

    distDir: '../docs',
    assetPrefix: '/nextjs-react-foundations/',
}

module.exports = nextConfig

🧐 Take care

Remember to put an empty file .nojeyll named in the output folder or Github will ignore all the js files in _next folder

// Chapter-09_Installing Next.js/package.json
{
  "scripts": {
    "dev": "next dev",
    "build": "next build && touch ../docs/.nojekyll"
  },
  "dependencies": {
    "next": "^14.0.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  }

Credits

NextJS.org - tutorial https://nextjs.org/learn/react-foundations

This README has been optimized for accessibility based on GitHub's blogpost "Tips for Making your GitHub Profile Page Accessible"

License

MIT