Open follower opened 7 years ago
Approaches to referencing GitHub-based files (tested with .stl
files):
Requires no configuration. Probably not an "endorsed" use--although that may be a historical issue.
https://raw.githubusercontent.com/Omniblox/pcb-component-models/f7e9fd80446ec4771459ea92b55462a94e02a411/models/sparkfun/production_parts/passive/resistors/0603/LED-0603.stl
componentMapCfg: {mapUrl: "components.json", urlPrefix: "https://raw.githubusercontent.com/Omniblox/pcb-component-models/f7e9fd80446e c4771459ea92b55462a94e02a411/"}
raw.githubusercontent.com
domain.)Note: 3rd Party service not run by GitHub.
http://rawgit.com/Omniblox/pcb-component-models/f7e9fd80446ec4771459ea92b55462a94e02a411/models/sparkfun/production_parts/passive/resistors/0603/LED-0603.stl
(Only intended for development and not production use.)http://cdn.rawgit.com/Omniblox/pcb-component-models/f7e9fd80446ec4771459ea92b55462a94e02a411/models/sparkfun/production_parts/passive/resistors/0603/LED-0603.stl
. Content type given as application/vnd.ms-pki.stl
.Requires one-off configuration to enable.
master
(or master/docs
) in addition to gh-pages
for source (via & via). This seems like a good thing as it means we don't need to replicate master
to gh-pages
but it does raise questions about how best to support versioning.For quick-and-dirty use, one-off GitHub Raw URLs work but questions over legitimacy mean they're not really an option for ongoing use.
Recommend ongoing uses GitHub pages (ideally with some sort of versioning).
I've enabled GitHub pages with master
as the source, for now (e.g. https://omniblox.github.io/pcb-component-models/components.json). Can be configured for use with:
viewComponents: true,
componentMapCfg: {mapUrl: "https://omniblox.github.io/pcb-component-models/components.json",
urlPrefix: "https://omniblox.github.io/pcb-component-models/"}
We will probably regret not having versioning at some point. :)
It occurred to me we probably want to use a custom sub-domain of omniblox.com
rather than github.io
—this requires "Setting up a custom subdomain".
We would need the CNAME configured on the DNS side and then configured on GitHub (although they recommend the reverse order of operations).
Current status:
omniblox.com
if we want that.~ [via]i've pointed omniblox.parts at omniblox.github.io as a custom domain.
Lol, fancy, @ the TLD*. :)
Thanks for setting that up. I can confirm the following appear to work happily:
Now that we have the domain set up, I wonder if we want to change the default behaviour of the Eagle-Loader library to be to use the hosted version of the components.json
and models? Do you have a preference?
Also, at some point we may wish to look at additionally hosting with HTTPS.
(* Did you also register the .party
variation? After all, "...there ain't no party like an Omniblox party...")
to save our future selves cursing our past selves into eternity... can you version the urls please? let's put this work on omniblox.parts/0/
Okay. :)
I was thinking we could have a non-versioned URL always be the latest and then a versioned URL if people need to stick to a particular version?
I just looked into GitHub Pages symlink support and this repository suggests that it might be possible to use symlinks: https://github.com/s4y/gh-pages-symlink-test
I'll try out the symlink approach and see if it works--unless you want to use only versioned URLs.
i'd prefer versioned urls right now
a cursory search indicates that github pages will work ok for serving up static JSON