You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good catch, however I do not think we should restore the /themes directory.
Having duplicate files in multiple locations in a single repo is a bad idea. Doing so invites confusion among those unfamiliar with the details of why duplicate files exist, which can lead to public-facing mistakes that require long-term support. This is an excellent example, and I believe it is a mistake we should correct for v5:
The next release is going to be a breaking change because our codebase no longer supports legacy browsers. If we want to make a change, this is the time to do it.
Our documentation should not recommend loading unminified CSS or JS files on a production site. Similarly, our CLI output should not load unminified CSS or JS by default. We can offer unminified CSS/JS as options, but our recommendation should be to use minified CSS/JS.
All distributable files belong in the same directory. For v4, this is /lib. For v5, the proposed location is /dist.
If we want to offer minified and unminified CSS files, we should differentiate using the filename and not the location, just as we do with docsify.js anddocsify.min.js. For v5, this would mean something like /dist/themes/vue.css and /dist/themes/vue.min.css. chore: optimize compressed css script #2338
I planned to address this issue in an upcoming PR as part of our v4 => v5 transition:
Modify build to output distributable files to /dist instead of /lib. This is part of the v4 => v5 transition.
Update URLs as needed in docsify and docsify-cli repos to reference /dist instead of /lib.
Create static redirects/imports from /lib and /themes to @4/lib and @4/themes CDN URLs. This allows v4 sites without a URL version lock to continue working when they unintentionally load v5 after its release.
Add a console deprecation / upgrade notice for sites loading resources from /lib or /themes redirects/imports.
The static redirects/imports in /lib and /themes are a temporary solution. They exist only to prevent sites that load docsify resources without URL version locks from breaking when v5 releases because v4 was released in 2017 but our docs did not recommend URL version locks until mid-2020. My hope is that they will can remove them by the time v6 is released.
trusktr
changed the title
All distributable files belong in the same directory
All distributable files belong in the same directory (move all to dist/)
Mar 27, 2024
Uh oh!
There was an error while loading. Please reload this page.
Good catch, however I do not think we should restore the
/themes
directory.Having duplicate files in multiple locations in a single repo is a bad idea. Doing so invites confusion among those unfamiliar with the details of why duplicate files exist, which can lead to public-facing mistakes that require long-term support. This is an excellent example, and I believe it is a mistake we should correct for v5:
/lib
. For v5, the proposed location is/dist
.docsify.js
anddocsify.min.js
. For v5, this would mean something like/dist/themes/vue.css
and/dist/themes/vue.min.css
. chore: optimize compressed css script #2338I planned to address this issue in an upcoming PR as part of our v4 => v5 transition:
/dist
instead of/lib
. This is part of the v4 => v5 transition.docsify
anddocsify-cli
repos to reference/dist
instead of/lib
./lib
and/themes
to@4/lib
and@4/themes
CDN URLs. This allows v4 sites without a URL version lock to continue working when they unintentionally load v5 after its release./lib
or/themes
redirects/imports.The static redirects/imports in
/lib
and/themes
are a temporary solution. They exist only to prevent sites that load docsify resources without URL version locks from breaking when v5 releases because v4 was released in 2017 but our docs did not recommend URL version locks until mid-2020. My hope is that they will can remove them by the time v6 is released.Originally posted by @jhildenbiddle in #2335 (review)
The text was updated successfully, but these errors were encountered: