Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider creating separate hugo pages for each important url #790

Open
ionous opened this issue Jul 25, 2024 · 1 comment
Open

consider creating separate hugo pages for each important url #790

ionous opened this issue Jul 25, 2024 · 1 comment

Comments

@ionous
Copy link
Contributor

ionous commented Jul 25, 2024

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 down1 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 )


Footnotes

  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.

@ionous
Copy link
Contributor Author

ionous commented Aug 2, 2024

see also: #744 ( Make a new page template for Pedalpalooza 2007 and earlier )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant