Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Determine how to handle Vuepress code snippets in docs

Đang mở
#1,487 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
shell

Hướng nghiên cứu

Xem xét các đoạn mã Vuepress hiện có của Book, các tệp .sh của chúng và các bản dịch ngôn ngữ tương ứng. So sánh các tác động đến việc bảo trì và làm nổi bật cú pháp được mô tả ở đây; công việc được xem là hoàn tất khi đã đưa ra và ghi lại một quyết định rõ ràng về việc giữ lại hay loại bỏ các đoạn mã cũng như những gì cần được cập nhật.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
TypeScript
Star
260
Fork
563
Merge trung bình
4 giờ 36 phút
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nushell/nushell.github.io

Tất cả issue của nushell/nushell.github.io

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.