consider creating separate hugo pages for each important url
维护者通常 7 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 20/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- hugo, javascript
- 领域
- build-system, web-dev
调研方向
首先阅读 netlify.toml、app/facade.js 和 services/nginx/conf.d/shift.conf,比较生产环境和开发环境的 URL 映射。然后检查 addevent.md、calendar.md 和 pedalpalooza 的内容,以及 caledit/calevents 的布局,同时参阅 Hugo 基础模板和 shortcode 文档;当所选结构能够分离重要的 URL 类型,且不会让这三处映射出现不同步时,工作就完成了。
由索引模型根据 Issue 内容生成。
描述
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):
- all https://shift2bikes.org/addevent/... urls are handled by addevent.md which uses the caledit layout.
- 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 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
shift-org/shift-docs 的其他 Issue
-
Export links and the webcal feed 404 under npm run dev可能已有人在做 @dduugg 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 83/100
shift-org/shift-docs#1121 ·
维护者通常 7 天内回复
-
Unknown --db values report a TypeError instead of the intended error可能已有人在做 @gangster 于 74 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
shift-org/shift-docs#1091 ·
维护者通常 7 天内回复
-
validateRideLength accepts any Object.prototype key as a ride length可能已有人在做 @gangster 于 74 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
shift-org/shift-docs#1089 ·
维护者通常 7 天内回复
-
Favorites page fetches every favorite because getDaily's guard is inverted可能已有人在做 @gangster 于 74 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
shift-org/shift-docs#1087 ·
维护者通常 7 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
shift-org/shift-docs#1126 ·
维护者通常 7 天内回复
查看 shift-org/shift-docs 的全部 Issue
相似的 Issue
-
documentation good first issue theming
难度 2/5 1-3 小时 新手友好度 85/100
-
feature
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
drevendev/PatchPitch#2 ·
-
难度 1/5 1 小时以内 新手友好度 65/100
521xueweihan/HelloGitHub#4025 ·