[ Web Proxy ]
URL:
Viewing: https://snyk.io/redirect/github/docsifyjs/docsify/issues/780 [Back]  [Original]

Specify major version number in URLs Issue #780 docsifyjs/docsify GitHub
Skip to content

Navigation Menu

Repository navigation

More items

Specify major version number in URLs#780

Closed

Description

The HTML rendered by docsify-cli and listed in the Manual Installation section of the official docs results in the very latest version of docsify being loaded by default. This is not only bad practice generally speaking, but it also means that breaking changes introduced in a new major release could break a lot of live docsify sites.

The suggested fix is to specify a major version number in all docsify URLs:

<link rel="stylesheet" href="//unpkg.com/docsify@4/themes/vue.css">
<script src="//unpkg.com/docsify@4/lib/docsify.min.js"></script>

This means that when a new major version is released, site admins will need to manually update the URLs with the new major version number (e.g. @5). The benefit of this approach is that breaking changes in the new release will not affect existing docsify sites since they are loading the previous version.

If URLs are being updated, it's also worth considering the following:

  • Use CDN redirect URLs instead of specifying a path for the main lib file
  • Specify the URL scheme to avoid unnecessary redirects (i.e use https:// instead of //)
  • Switch to jsDelivr (Consider jsDelivr over unpkg for CDN#756) for better CDN performance
<script src="https://cdn.jsdelivr.net/npm/docsify@4/themes/vue.css"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>

Activity

  1. timaschew commented on Feb 25, 2019

    Member

    So this issue should be then migrated (or at least linked) to the CLI project, right?

  2. []timaschew
    added this to the 5.0 milestone on Feb 26, 2019
  3. []jhildenbiddle
    changed the title [-]Specify major version number in URLS (docsify-CLI & docs)[/-] [+]Specify major version number in URLs[/+] on Feb 28, 2019
  4. jhildenbiddle commented on Feb 28, 2019

    MemberAuthor

    It's a valid issue for this repo since the Manual Installation section of the docs needs to be updated, but yes--work will also need to be done in the CLI repo.

    I've made a similar issue in the CLI repo.

  5. trusktr commented on Jun 21, 2020

    Member

    Shouldn't this be in the 4.x project board?

  6. []jhildenbiddle
    removed this from the 5.x milestone on Jun 21, 2020
  7. jhildenbiddle commented on Jun 21, 2020

    MemberAuthor

    Yep. Done.

  8. []anikethsaha
    closed this as completedin #1225on Jun 23, 2020
  9. []anikethsaha
    added a commit that references this issue on Jun 23, 2020
    b90c948
  10. []trusktr
    added a commit that references this issue on Jul 4, 2020
    fc71b56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      • []Open in GitHub Copilot app

      Footer

      © 2026 GitHub, Inc.

      Web Proxy Viewer  |  New URL  |  Original Page