#Cannot deploy multiple pages on Netlify

2 messages · Page 1 of 1 (latest)

eager estuary
#

I have nearly completed the learning journal and wanted to deploy it on Netlify as everything works perfectly on the VS Code Live Server. When I deploy it via Github, the index.html page shows but the nav links return 404. I have tried configuring Vite (which I could be doing wrong), deleting Vite files. I have tried every variation of href format I know of.

This is super frustrating as other people seem to have no problem doing it the exact same way.

If anyone has any ideas that would be amazing!

Git repo: https://github.com/martic38/Learning-Journal
Deployment: https://ciaran-learning-journal.netlify.app/

GitHub

Responsive Learning Journal. Contribute to martic38/Learning-Journal development by creating an account on GitHub.

distant marsh
# eager estuary I have nearly completed the learning journal and wanted to deploy it on Netlify ...

simple solution: configure Vite to inlude multiple entry points, like so

import {defineConfig} from "vite"
import { resolve } from 'path'

export default defineConfig({
  build: {
    rollupOptions: {
      input: {
        main: resolve(__dirname, 'index.html'),
        heropost: resolve(__dirname, 'heropost.html'),
        aboutme: resolve(__dirname, 'aboutme.html')
      },
    },
  },
})

and you won't even need to import anything in index.js