Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basePath configuration not prefixing basePath to the static files(assets/scripts) #522

Open
sharathpc opened this issue Feb 16, 2021 · 1 comment

Comments

@sharathpc
Copy link

I want to deploy Catalog in a subdirectory like https://www.mysite/styleguide.

I have set the basePath to '/styleguide' in index.js

<Catalog useBrowserHistory basePath="/styleguide" title="Halo" pages={
    pages
  } />,

But after the build in the index.html the all the paths are showing as /static/build.js rather than /styleguide/static/build.js

How can I prepend the basePath to all the assets?

Catalog Version: 3.6.0

@mjavorka
Copy link

I fixed this problem with setting publicUrl="/styleguide"

Catalog.render(
  {
    title: 'My Style Guide',
    publicUrl: '/styleguide',
    pages: [
      // …
    ]
  },
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants