So I made a Typescript project with Visual Studio. It works fine when I launch it with Visual Studio, but if I try to push it to my GitHub Pages site, it will put the index.html
in a subfolder and I get a 404 error when I try to load my website. Even if I try to reference the index.html in the website url it doesn't really work.
I was wondering if it's possible to only publish the needed items. I think I would only need the subfolder. Correct me if I am wrong though.
Note: I have the GitHub extension for Visual Studio installed.
UPDATE:
Since some of the links don't seem to work anymore I think I should give some extra information. So basically you need to have a branch named gh-pages
. On that branch you need to have an index.html
file in your root folder. Then the index.html
file should be visible on the github page URL.
You need to push a branch named gh-pages
in order to view it as a website.
Create a new branch and then move the file into the root folder of the branch, upload it to the gh-pages
and you set to go.
Check this out:
https://github.com/nirgeier/JimVliet.github.io/tree/gh-pages
This is how your file should be inside your root folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With