How can I set the views directory with Pages?
I created a repo and cloned it but the directory in the repo has a Views folder with the homepage in it. I am unsure how to set a startpage within a folder
21 Replies
Under Settings -> Builds & Deployments -> Build Configurations you can change the output directory there
ps. for the future there is #pages-help for pages issues
This is what i tried but i still get a blank screen...
it shouldn't be directly to the file, should be just to
Views
, and be careful about the case too, Pages is case sensitive
Pages will automatically serve index.html if requesting a folder: https://developers.cloudflare.com/pages/configuration/serving-pages/oh i think i found my mistake thank you
I changed the build output directory to include the other folders that include the startpage but it still shows a blank screen
it's now /Views/Desktop/User/
what do you see under uploaded files?
the files have been cloned properly from github
so if you go to your pages.devand the path
/Views/Desktop/User/
do you see anything?no
weird, that's from the latest build, that file uploaded list? Can you share the pages.dev url?
aiopie-xyz.pages.dev
it also works with aiopie.co or www.aiopie.xyz
https://aiopie-xyz.pages.dev/Views/Desktop/User/ that works for me
is that what you want show on the front page on
/
?yes. is there a way to route it so when you type in aiopie.xyz it shows that. Im assuming theres a cname that Im missing
You want just .xyz to show that, or all of them?
all as in all custom domains?
yea
yes
then it's just a matter of changing that output directory
what do you have it set to right now?
/Views/Desktop/User/
do you have that leading slash
/
in the actual value? Shouldn't be needed
once you change that output directory you need to rerun the build as wellthank you for your help again