question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: versioning

See original GitHub issue

versioning

Summary

Support for creating docs for different versions.

Motivation

Versioning support in a documentation generator is quite helping as it helps in supporting separating the docs for different versions. Helps is covering breaking changes. Improves readability. There are other documentation generators that support this like docusaurus, gitbook etc.

Detailed Design

image

This will mainly require to make changes in the docsify-cli repo. I don’t think we need any changes in the core. We have great support for having navbar We will make use of that.

  • Configuration
...
$docsify = {
  version : {
   // none I guess
 }
}
...

We can either make it to the navbar.

  • cli command
docsify version <version> <path? = '.'>

This will do the following work in sequence

  1. it will create a version with name <version> in <path>
  2. check for the navbar markdown content i.e _navbar.md
  3. if present, good to go. If not present, ask whether the CLI can create a new one or not. If the CLI is answered with no. Stop the operation
  4. Update the _navbar.md by pretending the content with creating a new list versions. First, it will check whether versions are present as list heading or not. and inside that, append the list with the <version>. Use the AST for the markdown content in order to prepend, append, and check for the version list heading. (probably use remark)
  5. it will copy-paste every files/folder present in the current directory from where this command is being run i.e process.cwd() to that folder i.e <path>/<version>
  6. Done

Documentation

Create a versioning page in main docs. Create CLI command docs in the docsify-cli and either embed or do the remote rendering in the main docs in order to always show the latest docs

Drawbacks

Few cons or drawbacks

  • it mandates the use of _navbar.md
  • cant be customizable.
  • <please comment if you find any>

Backwards Compatibility Analysis

Not required. As it will need changes in the cli not in the core.

Alternatives

Manually copy-pasting the files/folder and changing the _navbar.md

Open Questions

  • do we want this on the sidebar? I tried but it was not looking good.

Help Needed

  • Please provide some ( edge ) cases where this might break.
  • Provide some suggestions to refine the proposal.
  • At last, anyone wants to implement/take this ?

Frequently Asked Questions

N/A

Related Discussions

Forgot the repo + issue. But I did notice few issues and requests for this.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:11
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
DanielPenningcommented, Oct 7, 2021

I second @Piotr1215 and @FaultyFunctions Any progress here? Versioning the docs is a really important feature. Current workaround with manually creating other docsify-folders with older versions and then linking to them is a pain. In my opinion the growing repo size would be acceptable.

0reactions
superchango2017commented, Nov 2, 2021

I second @Piotr1215 and @FaultyFunctions. Versioning is something a lot of people need. Would be great to see progress.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage proposal versions - Google Ad Manager Help
This article helps you understand how to manage versions of a proposal. We'll cover: Review buyer changes; Replaced with buyer version; Discard draft....
Read more >
A Proposal for Package Versioning in Go
Proposing official support for package versioning in Go, using Go modules.
Read more >
proposal: a version numbering scheme and release process ...
This proposal recommends that Go projects adopt the semantic versioning 2.0 standard for their version numbering scheme. This recommendation is informed by ...
Read more >
How To Do Document Version Control (with example)
Document version control is the process of tracking and managing different versions (or drafts) of a document so you know which is the...
Read more >
Product Proposal Versions - Oracle Help Center
Versioning a product proposal stores and tracks all changes that occur during the review and approval process. It helps in capturing and retrieving...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found