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

refactor layouts to use a base template #793

Closed
wants to merge 2 commits into from
Closed

Conversation

ionous
Copy link
Contributor

@ionous ionous commented Aug 2, 2024

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.

@ionous ionous changed the title refactors layouts to use a base template refactor layouts to use a base template Aug 2, 2024
@ionous ionous requested a review from carrythebanner August 2, 2024 05:24
@ionous ionous closed this Dec 21, 2024
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

Successfully merging this pull request may close these issues.

1 participant