Skip to content

A question about basePath #59

@SiarheiBobryk

Description

@SiarheiBobryk

Hey, @gregrickaby!

First of all, BIG thanks for your detailed instructions and the yml-file. I've been looking for a good starting boilerplate for deploying a Nextjs App via GitHub Pages and finally found it. You've helped me a lot.

Allow me to ask you a question.

I followed your manual in README.md but did not manage to make it. There was something wrong the path to images. Then I started experimenting. Eventually, the following changes worked for me:

  1. next.config.mjs:
/** @type {import('next').NextConfig} */
const nextConfig = {
  //...
  basePath: "", // just empty string, but not the repo name
  //...
};

export default nextConfig;
  1. Not applying any changes to the src prop of Image.

See my working commit

I'm trying to understand how it works, but I cannot get why the method above works for my repo? Maybe they've changed something in the API. Please explain.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions