refactor layouts to use a base template #793
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.