Repository navigation
Conversation
build-tokens.mjs writes the Hugo stylesheet, theme script, fonts, grain images and the example site's covers from design/. The Hugo image Dockerfile installs a sha256-checked official extended release.
…wn version differences
Layouts render the design's markup from one book-entry model shared by review posts and data/reading_log.yaml. Pages are lists of named sections; an unknown name stops the build. The footer credit lives in one partial a site can override with an empty file.
Layouts render the design's markup from one book-entry model shared by review posts and data/reading_log.yaml. Pages are lists of named sections; an unknown name stops the build. The footer credit lives in one partial a site can override with an empty file. Site paths from config, front matter and data stay under the baseURL.
…baseURL once Hugo title-cases term titles and already prefixes menu url entries with the baseURL's path, so the theme prints a term's own name and leaves an already-prefixed menu URL alone.
A rating of 0 now shows, any URI scheme passes through untouched, menu URLs without a trailing slash are not prefixed twice, related reviews come only from the main sections, paginated genre pages do not filter one page of results, and the colour-scheme meta allows both styles while the toggle is on. The demo's events move far enough ahead not to expire.
Pin the Hugo image to linux/amd64, stop early when an image is missing, report a fixture page that was not built as a failure, and refuse a v2+ release tag unless go.mod declares the matching /v<major> path.
Hugo title-cases a term page's own title when it has no _index.md. The demo's Science fiction genre has none, so the check fails if the genre list, the genre page, its title or a review's chip show Hugo's casing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The goal is backlinks to https://www.listofbooks.net/: every site that installs Readerly carries one footer credit, "Theme by List of Books". The WordPress and Jekyll ports exist. This PR adds the Hugo port, built to pass the themes.gohugo.io review. The directory's own links are nofollow, so installs are the backlink source, and the theme has to be good and easy to adopt.
What
hugo/theme/is the mirror root ofgithub.com/listofbooks-net/hugo-theme-readerly. It hasgo.mod(Hugo Modules),theme.toml,hugo.tomlwith[module.hugoVersion] min = "0.146.0", an MITLICENSE,images/screenshot.png(1500x1000) andimages/tn.png(900x600), and a README with absolute image URLs.readerly/entry.html, turns a review post or a row ofdata/reading_log.yamlinto one book-entry dict, and every card, shelf, statistic and the JSON-LD read that dict. Front matter keys match the Jekyll port (book_author,rating,status,finished, ...), so content moves between ports.readerly/section-names.htmlis the registry). An unknown name stops the build with an error that names it. A section with no data prints nothing.categoriesas genres (a theme cannot add a taxonomy, measured),menus.mainandmenus.footer,copyright, i18n with plural forms (i18n/en.yaml), page-bundle covers, RSS, and an archetype forhugo new content reviews/x.md.tools/build-tokens.mjs(additive outputs).filter.js(search on the archive) is the theme's own.layouts/_partials/credit.html. A site removes it with an empty file at the same path, and the README says so. The old pathlayouts/partials/does not override it on Hugo 0.146, so the README names_partials.hugo/theme/exampleSite/is Marginalia, the design's demo content.hugo/fixtures/holds bare, quickstart (hugo new sitewith a plain-string author and URL menus), sparse (missing fields, quotes and</script>), paginated (custom pager path under a non-root list page) and no-credit.tools/hugo-dev/has a Dockerfile with the official extended tarball, pinned by sha256, for 0.146.0 and 0.169.0. It also has builds, checks, side-by-side screenshots and the listing screenshots. There is a CI jobhugo.tools/publish-hugo.shis written and has not been run.Verification
/sub/with an empty stderr. Warnings fail the build:--quiethides them, so the harness reads stderr instead. The HTML is the same on both versions. Only Hugo's own alias pages and its generator meta are ignored./sub/. The markup and fixture cases pass. The demo matches the seven design pages, apart from the 6 listed exceptions intools/hugo-dev/parity-exceptions.json.theme.jscomes fromdesign/) and nits.Operator steps (not done here)
Create the
listofbooks-net/hugo-theme-readerlyrepo and runtools/publish-hugo.sh 1.0.0. Host a demo and adddemositetotheme.toml. Then send the themes.gohugo.io PR that adds the repo tothemes.txt.