My site consists of main page and then subages separated inside folders. How can I include subpages in my page host (firebase hosting)
(Frank's comment was really an answer)
Firebase deploys everything under the directory that you indicate. So if you have your main page (index.html) in the current and directory and the other pages in subdirectories under that, they should all be deployed if you configure public to point to the current directory.
Update Node (npm) and Firebase CLI tools
We had a problem related to this... After some time of no relation with Firebase we created a similar new project and uploaded the new files for the hosting. All seemed to work fine, except for ONE thing: sub-directories of the hosting simply didn't appear to have loaded, even when the number of files was correct on the Hosting section of the console.
After more than one day of updating all projects files, looking for answer (like in here) and more tests, we finally also updated NodeJS (npm) and Firebase CLI tools... that solved the problem.
So, always update the framework first.
For me it was a browser cache issue (with pwa), when I used a different browser it worked. And yes, I changed my firebase.json to this (it was "public": "public"):
{
"hosting": {
"public": ".",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
If you're deploying with Firebase tools, you may need to downgrade your tools first, because versions can be released which won't actually deploy subdirectory content from Windows (for example).
I lost the past couple days assuming the bug in a deploy pipeline must have been in code I wrote that nobody else uses, instead of in multiple recent versions of Google's production code that many developers use. Downgrading from 13.11.4 to 13.11.2 worked for me and several others.
A fix for that particular issue has been merged (but not yet released). However, one should be cautious of making the assumption I made as described above, and consider downgrading as a possible solution.
© 2022 - 2024 — McMap. All rights reserved.
public
to point to the current directory. firebase.com/docs/hosting/guide/… – Bibelot