angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

github pages deploy create wrong base href for repos with camelcase names

Open aj8k opened this issue 10 years ago • 4 comments

Ubuntu 16.04 angular-cli: 1.0.0-beta.19-3

  1. Create repo with name like this: someRepo
  2. ng github-pages:deploy
  3. Base href will be /some-repo, not /someRepo as was expected.

aj8k avatar Nov 15 '16 22:11 aj8k

The ng github-pages:deploy command derives baseHref from packageName, which is pulled from package.json.

package.json is created through ember-cli/lib/models/blueprint.js which uses the normalizeEntityName function to dasherize as they call it.

There must be a way to override the normalizeEntityName function to support camelCase.

rolyatsats avatar Dec 01 '16 20:12 rolyatsats

This also creates a problem for github pages that use custom domains.

In which case the base href needs to default back to just "/" and no longer the name of the repo, or "/some-repo".

Because unlike the github page, which serves content from: some-account.github.io/some-repo A custom domain no longer has the extra file path ie, not this: myWebsite.com/some-repo

Instead it servers from myWebsite.com, and so it needs a "/" base href.

Right now the solution is: ng github-pages:deploy --base-href /

WebDesignerKits avatar Dec 28 '16 18:12 WebDesignerKits

Closed via https://github.com/angular/angular-cli/pull/4385.

filipesilva avatar Feb 03 '17 14:02 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.