Skip to content

Options for putting the cover on the book #2

Description

@mmcky

#1 parks cover artwork in cover/ without touching the build. This issue lists the ways it could actually appear on the book, so the choice stays yours. None of it is urgent — the files are harmless where they are, and "leave it" is a legitimate answer.

Option Change needed Where it shows Needs new artwork?
1. Sidebar logo one line in _config.yml left sidebar, every page no
2. Landing page a directive in intro.md top of intro.md only no
3. GitHub social preview a Settings upload, no code repo link previews in Slack, X, email yes, landscape
4. Site og:image new dependency + config book link previews yes, landscape
5. Favicon one line in _config.yml browser tab yes, square
6. Leave it none nowhere no

1. Sidebar logo — the smallest change

_config.yml already carries an empty logo: key. Pointing it at the thumbnail is the whole edit:

logo: cover/continuous-time-thumb.png

sphinx-book-theme then renders it at the top of the left sidebar on every page, scaled to the sidebar width. The trade-off is that a 2:3 portrait image is tall — it pushes the table of contents down by roughly 375px, which is why many books use a wide wordmark in that slot instead. That cost is worth weighing here, since this book has a long table of contents: 23 chapters across two parts, plus appendices. Using the 480px thumbnail rather than the 1920px master keeps the built site light. One line to revert.

A second wrinkle specific to this cover: the artwork is a dark field, and sphinx-book-theme's sidebar is light in its default theme and dark in its dark mode. The cover will sit as a dark block against the light sidebar. That may read as deliberate or as a mistake depending on your taste — worth a look before merging.

2. Landing page — the cover where a book's cover goes

This leaves the sidebar and the table of contents alone, and puts the cover on intro.md only, floated beside the opening paragraphs. colon_fence is already enabled, so:

:::{image} cover/continuous-time-cover.png
:alt: Continuous Time Stochastic Processes
:width: 260px
:align: right
:::

The trade-off is that it edits your prose layout, and a right float would interact with the hand-drawn-figures note a little further down intro.md — worth previewing before committing.

3. GitHub social preview — no code at all

Settings → General → Social preview → upload an image. This is what renders when someone pastes the repository URL into Slack, X, or an email client. GitHub wants landscape, nominally 1280 × 640, so the portrait cover would letterbox badly; this wants a landscape derivative built from the same elements. The sample paths crop to landscape more naturally than most cover art would.

4. og:image for the deployed site

Same idea as option 3 but for the thomassargent30.github.io URL rather than the GitHub one. sphinx-book-theme does not emit an og:image on its own, so this needs sphinxext-opengraph added to requirements.txt, plus html.baseurl set — it is currently absent, and the extension needs it to build absolute image URLs. Also wants a landscape image.

5. Favicon

html.favicon is unset. The full cover does not reduce to 32px legibly, but a square crop of the sample paths alone would make a reasonable mark. Needs a derivative.

6. Leave it

The files sit in cover/ for slides, talks, or a future print edition, and the book stays exactly as it is today.

If you want a suggestion

Option 1 is one line and reverts in one line, but check the dark-block-on-light-sidebar point above first. Option 2 is the better choice if you would rather the table of contents keep its vertical space, which given its length here is a real consideration.

Happy to push any of these onto the branch in #1, or to produce the landscape and square derivatives that options 3–5 need. Equally happy to change the artwork itself — the palette, the paths drawn, or the kicker wording — if something is not to your taste.

For context, the book is now listed on the QuantEcon books page — see QuantEcon/website#257. The companion cover for Linear Time Series Analysis is offered in thomassargent30/sargent-time-series#1, with the same options written up in thomassargent30/sargent-time-series#2.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions