Open roddds opened 4 years ago
Upon further research, I realized Code Surfer is built on mdx-deck, which is built on gatsby, and according to https://github.com/gatsbyjs/gatsby/issues/1878 this will probably never be possible.
Damn.
So it turns out I was barking at the wrong tree here - that gatsby issue is related to renaming the public
directory itself, not any subdirectories. I also found this help page. So now the only step left was to figure out how to change mdx-deck's gatsby settings. As far as I could tell there was no way to do it directly, but as a workaround you could:
./node_modules/mdx-deck/gatsby-config.js
and include the pathPrefix
setting../node_modules/.bin/mdx-deck
from gatsby('build')
to gatsby('build', '--prefix-paths')
.As far as workarounds go this is a pretty terrible one, but since I won't be running builds that often, this is acceptable to me.
Would love to hear from other people that had similar problems.
Hi @roddds, I haven't tried changing the output path. But the build command is from mdx-deck
not code-surfer
. Maybe you should create the issue there.
Right now, by running
yarn build
a static version of the presentation is generated in the/public
directory, but I can't seem to figure out a way to change the relative path for static files. For example, if I'm uploading to a/presentation
directory on my server, all static files 404 becauseindex.html
and other files have paths relative to the root.In
create-react-app
this is solved by changing the path in the configuration file, but I can't seem to find how to do that with code-surfer.