1

I have deployed Angular website using Github pages. Entire process is successful but when I am opening the website its showing blank page. Its loading index.html page but still its blank. Can you please help me solve the issue.

Here is the link https://s530860.github.io/website/

https://s530860.github.io/website/

1
  • Did you build it as ng build --prod command? Commented Apr 27, 2019 at 1:42

2 Answers 2

3

If you deploy your website other than the main domain, you need to build it with this type of command.

  • In your example I can see you have using sub directory url called /website. So run this command.

      ng build --prod --output-path docs --base-href /website/
    
  • When the build is complete, make a copy of docs/index.html and name it docs/404.html.

  • Then push your docs directory to Github.

It is clearly mentioned in the official docs.

Angular Docs - Deploying Github Pages

Sign up to request clarification or add additional context in comments.

Comments

1

You also need:

--deploy-url /website/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.