Edit index file (or any other file after upload)

halterbaik.pages.dev this is my page. This is my trial page because my first time using it. I want to know can i edit the index file? Because i need to change the google verification site and the canonical of the page. THanks
18 Replies
Chaika
Chaikaβ€’14mo ago
Pages isn't too much of a traditional host, it's not meant to be used as a "file locker". You cannot edit specific files, or download content back, you can only upload everything again as a new version. You mentioned in general-discussions you used wrangler (I think?). When you first did wrangler pages deploy <dir>, it uploaded your entire directory. You just need to edit those files, and repeat the same command. It'll take care of finding what changed and only reuploading what is needed for you, and create a new deployment. If you didn't use wrangler and instead uploaded everything via the dashboard, you'd just reupload everything again that way with the changes made. If you used Git-based project a (Github repo, for example), you'd just commit the changes there and Pages CI/CD would run and build them.
aryaprasetya95
aryaprasetya95OPβ€’14mo ago
YEs i upload everything via the dashboard, so it means i can reupload anything on the same sites? for example halterbaik.pages.dev, i can just reupload the index.html file?
Chaika
Chaikaβ€’14mo ago
You need to reupload all files, even if they have not changed. If you only reupload index.html, that would be the only file your website would have. For example, you need to include your logo-pentaslot.webp, fav.png, etc
aryaprasetya95
aryaprasetya95OPβ€’14mo ago
So i reupload here ?
No description
Chaika
Chaikaβ€’14mo ago
That would be creating a new one, select your current Pages Project under Pages & Workers, and then you'll find create new deployment (This is one of the reasons why using Github/a git-based project is recommended, it makes this a lot easier, but if you can't, Direct Upload still works fine)
aryaprasetya95
aryaprasetya95OPβ€’14mo ago
I cant find the new deployment
aryaprasetya95
aryaprasetya95OPβ€’14mo ago
No description
aryaprasetya95
aryaprasetya95OPβ€’14mo ago
I only find ddelete deployment on the manage deployment tab
Chaika
Chaikaβ€’14mo ago
go back to the Pages Project Deployments tab don't go inside of a deployment
Chaika
Chaikaβ€’14mo ago
it's just in the default page of a Direct Upload Pages Project
No description
aryaprasetya95
aryaprasetya95OPβ€’14mo ago
Ah okey thank you so much So i just need to reupload everything there right?
Chaika
Chaikaβ€’14mo ago
yea, like you did with the first deploy, but with the changes
aryaprasetya95
aryaprasetya95OPβ€’14mo ago
Ok thank you, so its easier if i upload via github ?
Chaika
Chaikaβ€’14mo ago
It's easier to use a Github based project, yea. You can just commit the changes you make, and Pages will build your repo (if it's just html/css/etc, it just pulls down the repo and uploads it)
aryaprasetya95
aryaprasetya95OPβ€’14mo ago
You commit the change on github, and pages will automatically update it?
Chaika
Chaikaβ€’14mo ago
Indeed, Pages watches for changes and runs a build on any commit (by default, exact behavior is configurable) (It's Technically more accurate to say Github notifies Pages of any changes (via Webhooks) and then the build is run, but that's all done for you when you link the Github Repo)
𝕿π”₯𝔒 𝕺𝔬𝔭𝔰
I have question @Chaika can you tell me why when I uploaded new deployment. why does the url still use old build?
Cyb3r-Jak3
Cyb3r-Jak3β€’14mo ago
Please make your own post
Want results from more Discord servers?
Add your server