chaijs / chaijs.github.io

The chaijs.com website source code. Contributions welcome.
http://chaijs.github.io
49 stars 71 forks source link

BDD API reference is not shown #159

Closed weirdgiraffe closed 6 years ago

weirdgiraffe commented 6 years ago

http://www.chaijs.com/api/bdd/ page is almost empty and there is completely no references on it

tzkmx commented 6 years ago

It looks like the linked script for chai returns 404: https://cdn.rawgit.com/chaijs/chai//chai.js <- look the double slash before the file name.

duckbrain commented 6 years ago

Maybe a path like https://raw.githubusercontent.com/chaijs/chai/master/chai.js would be better. RawGit says the other format is for development and is rate limited.

wyckster commented 6 years ago

The double slash shows that the hash/key/branch fragment is missing from the API url.

It should look something like this: https://cdn.rawgit.com/chaijs/chai/master/chai.js

@duckbrain, I disagree. I looked at that RawGit link, and it says that the cdn.rawgit.com api is the one to use in production:

Use this URL in production

https://cdn.rawgit.com/chaijs/chai/master/chai.js

No traffic limits or throttling. Files are served via StackPath's super fast global CDN.

Use a specific tag or commit hash in the URL (not a branch). Files are cached permanently based on the URL. Query strings are ignored.

The catch: this is a free service, so there are no uptime or support guarantees.

vsr commented 6 years ago

The script url in the template is something like <script src="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/chai.js"></script> So, assuming that something went wrong during deployment and the site data wasn't loaded.

Could you please check @keithamus, @logicalparadox ?

lucasfcosta commented 6 years ago

Hey everyone,

Our bot was pushing the built _data to gh-pages while the website is being built from master due to this being the "home" repo for the chaijs org.

Should work just fine once #163 is merged.

That also fixes our build proccess by avoiding to push to master when the build has not been triggered directly by a merge to that branch.

The bot is also now the only user able to push directly to master.

Thanks everyone for spotting this and for your valuable input!

akikoskinen commented 6 years ago

Not wanting to make another issue for this, but at least these pages are broken too:

lucasfcosta commented 6 years ago

@akikoskinen This is caused by the same reason I mentioned above. There are no _data files on master, which is from where the site is being built from.

lucasfcosta commented 6 years ago

Fixed with mad doc reading skillz.

How I feel after solving this