shift-org / shift-docs

Shift2Bikes: website and calendar for shift and pedalpalooza
https://shift2bikes.org
Other
22 stars 17 forks source link

refactor layouts to use a base template #793

Open ionous opened 3 months ago

ionous commented 3 months ago

this moves the duplicated "chrome" of each page ( the html header, the menus, etc. ) into a "baseof.html" layout. ( which is a good first step for #790 )

the base defines {{ block" name" }}...{{end}} sections which have default content used by most layouts; but which can be replaced by certain pages when needed. https://gohugo.io/templates/base/

as part of this, i discovered some strange pages ( ex. https://www.shift2bikes.org/archive/ ). they are generated for each directory under "contents" using the list.html layout. none of the other shift pages link to them, but still: they seem a bit broken. In this pr, i replaced the contents of list.html with a meta redirect header to 404.html.

to make comparing the templates i did two submits. the first refactors to layouts, and the second cleans up the whitespace. when comparing it might be easiest to look at the first submit.

to test the final output, i regenerated the site locally and used BeyondCompare to diff the new and the old generated public directories.