free-programming-books-search
free-programming-books-search copied to clipboard
[BUGFIX-37] Relative urls with a harcoded contextPath
What does this PR do?
Add feature(s) | Fix
Description
Allow install app in other context path different to /free-programming-books-search to increase flexibility
Context
Resolves #37
Test deploy: https://davorpa.github.io/free-programming-books-search/ Check:
- H1 link goes to homepage
/free-programming-books-search/ - Any link in homepage goes to it related file (docs or listings)
- No extra ampersand in them before
sectparameter
is this to make it easier to test?
is this to make it easier to test?
Sorry sir :worried:. Not sure at all until deploy (execute npm run deploy from a cmd) with a production build
In local development works but in github.io I don't know because my environment is broken. I doubt if after apply this PR the context path is / or /free-programming-books-search
Maybe it lefts to add a .env.production file to force values for this build profile according to https://create-react-app.dev/docs/adding-custom-environment-variables#adding-development-environment-variables-in-env
A revert is always possible in the worst of cases
How to test if works...

Fresh news after fix my deploy environment
It works like expected. https://davorpa.github.io/free-programming-books-search/ without any .env file. Maybe due to package.json homepage attribute is setted.
- H1 link goes to homepage /free-programming-books-search/
- Any link in homepage goes to it related file (docs or listings)
- No extra ampersand in them before sect parameter
If you want be sure at local you always checkout this PR make a build and... follow steps posted in #39