How do you publish typescript site on GitHub pages using Visual Studio?

So, I created a Typescript project with Visual Studio. It works fine when I run it using Visual Studio, but if I try to click it on the GitHub Pages website, it will put index.html in a subfolder , and I get 404 error when I try to load my website . Even if I try to link index.html to the website URL, this does not work.

I was wondering if it was only possible to publish the necessary items. I think I only need a subfolder. Correct me if I am wrong.

Note. I have a GitHub extension for Visual Studio.

Project in VS

+5
source share
1 answer

You need to click on a branch called gh-pages to view it as a website.

Create a new branch, and then move the file to the root folder of the branch, upload it to gh-pages and you will set to go.

Check this:

https://github.com/nirgeier/JimVliet.imtqy.com/tree/gh-pages

This is how your file should be inside your root folder.

enter image description here

+1
source

Source: https://habr.com/ru/post/1245413/


All Articles