Skip to content

Determine how to handle Vuepress code snippets in docs #1487

Open
@NotTheDr01ds

Description

@NotTheDr01ds

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions