Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

consider creating separate hugo pages for each important url

未关闭
#790 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 7 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
停滞
技术栈
hugo, javascript

调研方向

首先阅读 netlify.toml、app/facade.js 和 services/nginx/conf.d/shift.conf,比较生产环境和开发环境的 URL 映射。然后检查 addevent.md、calendar.md 和 pedalpalooza 的内容,以及 caledit/calevents 的布局,同时参阅 Hugo 基础模板和 shortcode 文档;当所选结构能够分离重要的 URL 类型,且不会让这三处映射出现不同步时,工作就完成了。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
JavaScript
星标
30
派生
26
平均合并
6 天 24 分钟
30 天内合并 PR
6

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

shift-org/shift-docs 的其他 Issue

查看 shift-org/shift-docs 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。