Skip to content
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

Determine how to handle Vuepress code snippets in docs #1487

Open
NotTheDr01ds opened this issue Aug 1, 2024 · 2 comments
Open

Determine how to handle Vuepress code snippets in docs #1487

NotTheDr01ds opened this issue Aug 1, 2024 · 2 comments

Comments

@NotTheDr01ds
Copy link
Contributor

NotTheDr01ds commented Aug 1, 2024

I just noticed that the Book uses some Vuepress code snippets in places (but not everywhere). There are some advantages and disadvantages to these:

Advantages:

  • (Minor) Can be reused if needed
  • (Nice) Indention is much easier if the code-block is nested under a list item

Disadvantages:

  • (Major) All of the existing snippets are .sh files. These need to be updated to .nu files in order to obtain proper syntax highlighting, of course.
  • (Major) Renaming or moving a snippet requires updates to all language translations, otherwise we are left with broken links.
  • When a code snippet is updated, it is propagated across all language translations. This sounds nice, but that may not be desirable if the text around it needs to be updated as well, which will likely be the case.
  • Probably won't be portable if we change backends in the future

When I first saw these, I liked the concept, but after dealing with the ramifications, it seems like they might be more problematic than helpful.

At the least, all of them have to be reworked to get syntax highlighting. Should this just be a single "eliminate Vuepress snippets" enhancement?

@fdncred
Copy link
Collaborator

fdncred commented Aug 1, 2024

I'm fine with standardizing without tiny files. I never really understood why we had separate files instead of just putting them in code fences.

@NotTheDr01ds
Copy link
Contributor Author

NotTheDr01ds commented Aug 12, 2024

When I get a chance, I'll add this guidance to CONTRIBUTING.md and then close this out. Leaving it open as a reminder until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants