Skip to content
Johannes Hoppe edited this page Feb 17, 2017 · 7 revisions

Welcome to the angular-cli-ghpages wiki!

FAQ

My CNAME file is deleted on every publish?! (specific to github pages only)

That's by design, the command overrides everything. If it wouldn't do that, all the hashed bundles would stay, too!

You have to put a CNAME file into your dist folder.

Example:

ng build
echo "my-domain.com" > dist/CNAME
angular-cli-ghpages [OPTIONS]

Why is the routing is not working correctly on hard reload! (specific to github pages only)

That's because you are missing a 404 page. The old github-pages:deploy command created a 404.html file in the dist folder. This was required to fully support the router PathLocationStrategy. Right now you have to copy index.html to 404.html on your own. Please submit an issue if you really want this feature back.

Example:

ng build
cp dist/index.html dist/404.html
angular-cli-ghpages [OPTIONS]

How can I contribute to angular-cli-ghpages?

git clone https://github.com/angular-buch/angular-cli-ghpages.git
cd angular-cli-ghpages
npm link

npm link is very similar to npm install -g except that instead of downloading the package from the NPM repo, the just cloned angular-cli-ghpages/ folder becomes the global package.

Now you can use ngh via the command line. Please read the official npm-link documentation and the npm-link cheatsheet for more information.

Clone this wiki locally