API docs loading issue due to incorrect MIME type of styles and scripts
Closed this issue · 10 comments
- Go here: https://ember-resources.pages.dev/functions/use.html
- See that sub pages of the api docs refuse to load scripts and style because the MIME type is not supported:
Refused to apply style from 'https://ember-resources.pages.dev/functions/assets/highlight.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
use.html:1 Refused to apply style from 'https://ember-resources.pages.dev/functions/assets/custom.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
use.html:1 Refused to execute script from 'https://ember-resources.pages.dev/functions/assets/main.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
use.html:1 Refused to apply style from 'https://ember-resources.pages.dev/functions/assets/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
use.html:1 Refused to execute script from 'https://ember-resources.pages.dev/functions/assets/navigation.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
use.html:1 Refused to execute script from 'https://ember-resources.pages.dev/functions/assets/search.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
For step 1, where'd you get that link?
Anywho, The underlying issue is all Cloudflare breaking things.
Here is the background: cloudflare/workers-sdk#2240 (comment)
This caused it: cloudflare/workers-sdk#2103
the page you're looking for is here: https://ember-resources.pages.dev/funcs/use.html
It seems the script that rewrites functions to funcs forgot about some links in the nav https://github.com/NullVoxPopuli/ember-resources/blob/main/.github/workflows/ci.yml#L261
Ah, thanks, hehe,
Step -2: Go to the main site of the repository: https://github.com/NullVoxPopuli/ember-resources
Step -1: Click link to "API Reference" in section Documentation
this links you to https://ember-resources.pages.dev/modules
this links you to https://ember-resources.pages.dev/functions/use.html
@NullVoxPopuli The docs navigation is still broken.
Could it be as easy as this?
https://github.com/NullVoxPopuli/ember-resources/blob/main/docs/typedoc.config.json
"sidebarLinks": {
- "link": "/functions/link.link.html",
- "modifier": "/functions/modifier.modifier.html",
- "service": "/functions/service.service.html",
- "RemoteData": "/functions/util_remote_data.RemoteData.html",
- "UpdateFrequency": "/functions/util_fps.UpdateFrequency.html",
- "keepLatest": "/functions/util_keep_latest.keepLatest.html",
- "debounce": "/functions/util_debounce.debounce.html",
- "map": "/functions/util_map.map.html",
- "trackedFunction": "/functions/util_function.trackedFunction.html",
- "trackedTask": "/functions/util_ember_concurrency.trackedTask.html",
- "helper": "/functions/util_helper.helper.html"
+ "link": "/funcs/link.link.html",
+ "modifier": "/funcs/modifier.modifier.html",
+ "service": "/funcs/service.service.html",
+ "RemoteData": "/funcs/util_remote_data.RemoteData.html",
+ "UpdateFrequency": "/funcs/util_fps.UpdateFrequency.html",
+ "keepLatest": "/funcs/util_keep_latest.keepLatest.html",
+ "debounce": "/funcs/util_debounce.debounce.html",
+ "map": "/funcs/util_map.map.html",
+ "trackedFunction": "/funcs/util_function.trackedFunction.html",
+ "trackedTask": "/funcs/util_ember_concurrency.trackedTask.html",
+ "helper": "/funcs/util_helper.helper.html"
},
Could it be as easy as this?
Probably! Do you want to submit a pr?
perhaps I need to not use cloudflare for typedoc deployments :(
seems fixed now!
Reopening, the issue is back now.
- Go here: https://ember-resources.pages.dev/
- Click on resourceFactory
- See missing styles due to
Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
:
grrrrr this functions
thing oof
ah, in protest, I moved the docs here to Vercel: https://ember-resources.nullvoxpopuli.com