-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Removing compiled docs
from the source code repository
#4605
Comments
I'm 👍 for completely removing it too. Or even better, moving I think the main reason why we haven't is that it's because if we have a Mermaid code block like: flowchart TD
A[Hello] --> B(World)
GitHub will render the Mermaid diagram, but there's no way to see the Mermaid source-code for a diagram. So my gut feeling is to wait and hope GitHub adds this feature. Originally posted by @aloisklink in #4382 (comment)
Ah, sorry, the docs at mermaid/.github/workflows/publish-docs.yml Lines 57 to 59 in 194ef20
I believe the main reason why we need to compile the docs from
Because GitHub's Mermaid preview only shows the diagram (there's no easy way to see the source-code of the Mermaid diagram), we need to duplicate the Mermaid diagram definition, once with a Lines 12 to 26 in 194ef20
I believe this is the main reason why we can't just delete
We do get quite a few PRs that only edit the files in From https://github.com/mermaid-js/mermaid/graphs/traffic, apparently It might just be worth deleting |
Is it because there isn't a perfect way to highlight code or something else? I guess this could be resolved with Langium, just if I knew how to render a diagram without the language server :| |
Github pages used to work in such a way, that they could serve a folder from your repository. So probably |
It looks like we do!! #4473 It looks like the root path (https://mermaid.js.org/) had ~30k views in the last week, which is a lot more than the 500 views that https://github.com/mermaid-js/mermaid/tree/develop/docs had! With those numbers, I wouldn't mind too much if we deleted
I think it's more that normally, if the average GitHub user writes a GitHub did recently add the Copy button to copy the source-code of a Mermaid diagram, but making that change is a lot easier than making a button to show the source-code: |
Let me try to make sense of the docs journey.
What now? Facts:
I think keeping the generated docs in the repo is doing more harm than good (to the maintainers and contributors, not to the users). As none of our active maintainers have expressed any concerns against this until now, we should be good to go. Will check with @knsv too. But, we should still use proper Markdown to write the docs, instead of any framework flavoured ones. (E.g.: the |
regarding the last part "But, we should still use proper Markdown to write the docs, instead of any framework flavored ones. (E.g.: the note, warning labels in vitepress). This will ensure that we can switch to another framework when required." But.. saying that , there is several vitepress specific features I would use.. |
@emersonbottero code groups is a nice feature, recently I implemented similar behavior using pure Vue component, that was a bunch of switch buttons, that allowed to update your page dynamically and display only those things that are related to a current selected mode. So the similar idea was applied to the whole document, not to the code groups only. But sticking to the pure markdown is what allows us to switch seamlessly between different frameworks. After discussion we decided to remove it, because we cannot embed all those features in our core documentation, unfortunately. I personally think that our needs have exceeded markdown facilities. But we cannot utilize framework-specific features to meed our demands. The way to go is to add custom extensions that are compatible with markdown (pure js) or replace markdown with something equally widespread and simple. |
I would use more types of alert and.. we could define a rule like : in the summary is the divisor for tabs then something like Group1: config.js/**
* @type {import('vitepress').UserConfig}
*/
const config = {
// ...
}
export default config Group1: config.tsimport type { UserConfig } from 'vitepress'
const config: UserConfig = {
// ...
}
export default config would use the default section in github but it will look like |
Now I am revising "contributing to documentation" section and it says "we allow documentation PR's to target master branch, if it is for documentation only". This means, that our docs have different release cycle from mermaid package. Any thoughts? |
I think that's the point of it. Improved documentation doesn't need to wait for the next Mermaid release, we can just release it straight away by putting it on Although, I'm not a big fan of targeting the I'll much rather have something like what Docusaurus-based websites often have: a |
@aloisklink My suggestion is to make guidelines in the way that targeting development is the default regardless of type of change. Maybe even a hot fix is not an exception either. By doing that we are
upd: |
Idea
I think that we should remove
docs
(compiled version) folder from this repository, and move it to a separate one. Keeping it there equals to havingdist
in the repository along with source code.Why it is there
What to do
Reasons for deletion / moving
node_modules
docs
folder while searching, no confusionOriginally posted by @nirname in #4382 (comment)
The text was updated successfully, but these errors were encountered: