I'd like to make a page transition between the HTMLs that appear in the public folder with the gatsby build
command.
When operating locally, the link becomes a relative path like file://pandas-and-bananas/
and cannot be opened.
Please let me know how I can output it as a link that works locally because I have no knowledge of HTML or JavaScript.
Thank you for your cooperation.
You will need to start the web server
If Gatsby is included, I think you are using npm, so you may want to use serve.
npmi-g serve
After the installation is complete, the serve
command is available.Enter and exit the cd
command in the public
directory to which Gatsby outputs, and run serve
.
By default, you can check it by browsing to http://localhost:5000.
© 2024 OneMinuteCode. All rights reserved.