angular / material.angular.io

Docs site for Angular Components
http://material.angular.io
MIT License
874 stars 388 forks source link

infra: hardcoded paths break ability to host docs on-premise #623

Closed umdstu closed 4 years ago

umdstu commented 4 years ago

This repository is meant to be configurable and built to be self-deployed. It works, mostly, but there are issues:

  1. Assets don't load - many of the components point to the assets found in assets/img, etc., but the instructions say to simply update material2-docs-content repo, however those files have the asset paths hardcoded again to material.angular.io/assets/ rather than a relative path.

  2. VersionPicker- This ties into number 1. The versions.json file points directly to the material.angular.io host, not a relative asset path, so it doesn't load and the dropdown appears obviously broken in the UI.

  3. Material Icons fonts and css loaded via google-fonts, directly in the index.html. Could be made more configurable to point to a self-hosted version of the fonts w/o modifying the index.html page.

Splaktar commented 4 years ago

I've updated the link to versions.json in version-picker.ts to use a relative URL. PR coming soon.

If you want to deploy your own version of the docs site, you will need to update

If you want to deploy behind a firewall, you will need to do one of these:

umdstu commented 4 years ago

@Splaktar Awesome, thanks for the great/quick work on this. I will give it another go building/standing this up internally!