uikit / uikit-site

🌎 Website and Documentation
https://getuikit.com
365 stars 331 forks source link

Off-canvas menu items not working #193

Closed sargac closed 1 year ago

sargac commented 4 years ago

When browsing through the offline UIkit 3 version and using buttons and text links, everything works. For example, if I choose Get Started from the intro site, I am successfully redirected to https://uikit.local.dev/docs/introduction and I can see the content.

But, if I try to refresh the page, or use the off-canvas menu item labeled Introduction -- the site won't work, and would be blank.

I discovered, that erroneous off-canvas menu items use dot-slash a href syntax ./introduction while the working links use clean a href values introduction, if that may cause the error.

Besides, there a few errors, listed in a Developer Tools, as:

Any help in the right direction would be appreciated.

janschoenherr commented 4 years ago

Is this resolved with the latest commits?

sargac commented 4 years ago

No, it's all the same. But it might be a problem with my setup -- all files are outside of a shared folder on Linux VBox, and I am accessing a webpage on Windows. I'll try to move files to a shared folder and see if that changes anything.

sargac commented 4 years ago

I've just tested, and it doesn't work this way either. The first problem was the assets/uikit symlink which wasn't working on Windows, so I copied the whole node_modules/uikit folder -- but even with that, the page is blank, and doesn't show even the start page.

There are some MIME type and JS SyntaxErrors displayed in Developer Tools. I'm using the newest Nginx server -- maybe there is a problem with MIME type?

11:03:08.480 The script from “https://uikit.local.dev/assets/uikit/dist/js/uikit.min.js?{{BUILD}}” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
11:03:08.480 The script from “https://uikit.local.dev/assets/uikit/dist/js/uikit-icons.min.js?{{BUILD}}” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
--
11:03:08.484 SyntaxError: expected expression, got '<'   uikit.min.js:1
11:03:08.484 SyntaxError: expected expression, got '<'   uikit-icons.min.js:1
11:03:08.486 ReferenceError: UIkit is not defined        main.min.js:1:928
sargac commented 4 years ago

Just to recap: