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

consider creating separate hugo pages for each important url

Đang mở
#790 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 7 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
20/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
hugo, javascript
Lĩnh vực
build-system, web-dev

Hướng nghiên cứu

Bắt đầu bằng cách đọc netlify.toml, app/facade.js và services/nginx/conf.d/shift.conf để so sánh các ánh xạ URL của môi trường production và development. Sau đó kiểm tra nội dung của addevent.md, calendar.md và pedalpalooza, cùng các layout của caledit/calevents bên cạnh các template cơ sở của Hugo và tài liệu về shortcode; công việc hoàn tất khi cấu trúc được chọn phân tách các loại URL quan trọng mà không để ba ánh xạ bị lệch nhau.

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

Mô tả

frontend question

In talking through the hugo url handling at the biking and bits ride with Steven and Melanie -- i think it might be good to detangle the page handling some. ( noting that this would be a relatively big change. )

currently, production splats down[^1] what should be multiple pages into single page(s):

  1. all https://shift2bikes.org/addevent/... urls are handled by addevent.md which uses the caledit layout.
  2. all https://shift2bikes.org/calendar/... urls are handled by calendar.md which uses the calevents layout

what might be better is something like:

  • newEvent.md: for shift2bikes.org/addevent/
  • editEvent.md: for shift2bikes.org/addevent/edit-<event_id>-
  • calList.md: for shift2bikes.org/calendar/
  • calDaily.md: for shift2bikes.org/calendar/ event-<daily_id>

each pointing to a unique layout. similarly, the pedalpalooza page ( +/- the archive pages ) could point to pedalpalooza-calendar.md as they do currently; but that markdown could use a specialized pedalpalooza layout instead of calevents.


probably first it'd be worth investigating base templates. much of the various layout .html is duplicated, and introducing new layouts would only make that worse. ( base templates would allow better sharing )

or, as an alternative to adding a layout per .md file, it might be possible to create custom shortcodes so the .md files can directly indicate how the page should look. ( right now the .md files are empty except for the layout type: name )


[^1]: the production mapping is in netlify.toml: https://github.com/shift-org/shift-docs/blob/87980dcf72c81a9679b79432a43ad1ce03d1596e/netlify.toml#L137 -- unfortunately, netlify.toml isn't used in development mod. so its behavior is duplicated for 'npm run dev' byapp/facade.js and in services/nginx/conf.d/shift.conf for docker dev ( under the section 'development endpoints'. ) all three spots would have to be updated to stay in sync.

Ngôn ngữ chính
JavaScript
Star
30
Fork
26
Merge trung bình
6 ngày 23 giờ
Pull request đã merge (30 ngày)
3

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 shift-org/shift-docs

Tất cả issue của shift-org/shift-docs

Issue tương tự

Thêm issue về JavaScript

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.