-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring docsify-cli into this repo for easier development. #2277
Comments
Is it worth revisiting the need for Based on the docs it provides the following:
I don't have strong feelings one way or the other. I'm only proposing revising the need for |
I agree with @jhildenbiddle. Keep docsify-cli as the standalone repository it is now. |
I think @jhildenbiddle is asking if we should even keep the cli or not, regardless where it is located. Agreed, a static server feature isn't really a high importance feature, but the other things do seem unique and not possible to handle with just a template (but happy to know I'm wrong if there's a way). Besides sidebar generation, I think we should keep it for future
As for the sidebar generator, I don't see how the File System API can help with that. That's a client side feature, and sidebar generation is not on the client side. If we keep the CLI, I think moving it to main repo makes maintaining it easier, so we can have
Right now, it is possible to change Docsify in some way that breaks the CLI, and we won't know this happened. |
Short-term, this is correct. My intention in asking the question is to avoid unexpected complications that often result from merging one legacy codebase into another and consider potentially better ways to perform the same tasks as Long-term, I agree that we may find ourselves longing for a CLI tool to handle new Docsify features. Or, we may not. The examples you've given (SSG and search index generation) are noteworthy, but to my knowledge nobody is working on those features or intends to work on them anytime soon. Therefore, I don't think it makes sense to merge the
We could provide a tool on our website that is similar to the one offered on sites like prismjs.com. Docsify only has a few plugins and themes, so this wouldn't be too hard to create. We could build it today as a Vue component and launch it as a simple documentation update if we wanted to. Another option (as mentioned above) is to provide a site template repo that provides the files necessary for a basic Docsify starter site. Our documentation can provide instruction on how to configure the cloned files to be served by GitHub Pages. This is exactly what @paulhibbitts is doing with docsify-open-cource-starter-kit. It's a non-interactive option (meaning users can't select their plugins or themes), but it's a nice option to have for those who may lack the ability or desire to deal with the CLI, Git, etc.
Based on the source code it appears the CLI generator simply reads a local directory of files, generates some basic markdown, and then outputs a markdown file to the local disk. These same steps can be done with the File System API (see here for details). Should we do this? I dunno. I'm only suggesting that it may be worth exploring since being able to do things that previously required a CLI tool without requiring a CLI tool provides benefits like making features available to people who lack the ability or desire to use a CLI tool. There are obviously implementation details to work out and we may learn that using the File System API for this task is a bad idea. I suggested it only as an option to explore.
Understood, but if we provide alternative ways to generate and serve docsify files we won't need |
That would be a big project that I won't have time for. Do you?
We have https://github.com/docsifyjs/docsify-template
Are you suggesting a page on docsify.js.org where the user opens a file picker, selects their docsify project folder, then Docsify site gives them a download containing the sidebar that they can save into their project? That could be neat. I still think a CLI tool is useful. For example someone can generate their sidebar in a GitHub Action when they push their changes.
Yeah, but who is going to implement that? I propose we do one of these:
In other words, choosing between:
i.e. all of our features should be verified to be working. And we should delete features we don't want. Being stuck in between doesn't feel like a better option. Your ideas are interesting, but who wants to and has time to implement those right now? As soon as I circle back from Lume, my priorities will be:
|
We could keep it in a separate repo, but then perhaps we should add a test that clones it (possibly as a git submodule), and verifies it works, with each Docsify build. The result would be similar that way too. |
@trusktr --
None of the projects I've mentioned were on my radar, but any or all of them could be if there was enough interest. Other maintainers or contributors may also have interest, which these types of conversations can initiate and gauge. This is the first time these alternative approaches have been discussed so we don't know what the level of interest is or where these discussions will land. That's why they are worth having. These proposals don't need to be an either/or options. We can have both CLI- and web-based tools that do the same thing for different users. I am not opposed to having a CLI tool. I proposed considering web-based alternatives to our current CLI tool so we might 1) expose features to a larger audience and simplify the process of using them by removing the Node.js requirement, and 2) make the best use of the limited time and resources we have. But admittedly, we are getting in the weeds on topics other than this specific issue. I can create separate issues for these features so we can have more focused discussions elsewhere. As far as merging the two repos goes, this is probably as good a time as any to do it since our development branch already contains breaking changes that will require a major version bump and updated documentation. Since this work is being done under a larger Simplify and modernize Docsify effort, here's what I would hope to see in the PR:
If we are conscientious about how we merge as outlined above, I'm all for it. |
I agree with @jhildenbiddle that we don't need move And I m same to @trusktr that I think the What I could image less or more:
If we don‘t put it in the main repo, we could individually use other Besides, the whole things above obviously could put in an |
I don't like the submodule, the |
Also archive the docsify-cli repo after.
The text was updated successfully, but these errors were encountered: