Help! Page shows up as empty source code!

For Workes & Pages, what is the name of the domain?

https://48bc324c.troyhighsmosaic.pages.dev/

What is the error number?

No error number, completely blank

What is the issue or error you’re encountering

My page shows up as a completely blank source code whenever i open it up.

What steps have you taken to resolve the issue?

I followed a youtube tutorial on how to deploy your website with cloudflare. I am new to web development, and haven’t used cloudflare before and am making a page for school. At first, it showed me an “couldn’t find page” HTTPS error, but then i realized I didn’t name my home page ‘index’ and changed it. After this, it just showed me empty blank source code. I assumed maybe it’s because my repo is set to private, and tried again as a public repo - still the same thing. I don’t understand why. When i look at my github repo, it has a check mark, and nothing seems to be wrong with the logs. So why doesn’t it show up on my computer? I made another site just to see if that page was simply screwed, but the same thing happened.

What are the steps to reproduce the issue?

go to workers and pages → pages → upload page using github → ready → click website link

Screenshot of the error

Make sure your site’s content is in the directory Pages expects it to be. In the Cloudflare dashboard, in your Pages project, go to Settings, and choose Builds & Deployments. In the Build Configurations section there is a setting for “Build output directory”. This should be set to the directory where your site’s content (your index.html and so forth) are. This directory depends on what tools you’re using to build the site.

If that’s not it, and your repo is public, post a link to that.

1 Like

thank you for the help! i did this and it still showed up blank, here’s so what you can see what i did so far

the build configuration (i changed just index html to something more exact like code/index.html, and it does the same thing), then the logs. i still don’t understand what the problem is :frowning:

also here’s my repo, i made it public GitHub - mosaiclitmag/troyhighmosaic !

The build output directory should be the directory containing the index.html file, not the file itself. In your case, /codes.

1 Like

I did this and now the page shows up! thank you. my only issue now is that the css wont appear nor will the links, so im trying to figure that out.

It’s just basic HTML stuff to learn. In your index.html you have this:

<link href="codes/home-page.css" rel="stylesheet" type="text/css" media="all">

But that link is relative to the HTML file. It should either be just home-page.css or it should be an absolute link starting with a slash, like /codes/home-page.css. No worries, you’ll get there.

1 Like

Ahhh, alright! thank you. How peculiar, though! I attempted both (home-page.css + /codes/home-page.css) as well as the same method on the other links, yet… the same thing happens. CSS still doesn’t show up, and links just appear as the homepage.

Bah, I’m sorry, I saw my mistake as soon as you said it didn’t work :man_facepalming:t2:

The /codes part isn’t part of the path from the point of view of your site. /codes is the root directory, so the link should just be: /home-page.css

2 Likes

it’s fine! i appreciate your help, i’m new to this kind of stuff. i’m going to try this now!

It works now! thank you so much for your assistance!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.