Repository navigation
Fix gallery card titles and let notebooks pick their thumbnail - #913
Open
jessegrabowski wants to merge 10 commits into
Open
jessegrabowski wants to merge 10 commits into
jessegrabowski wants to merge 10 commits into
Conversation
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.
Gallery card titles are now plain text taken from each notebook's first
#heading, and the card itself is the only link.ITEM_TEMPLATEused to wrap every title in:doc:. That rendered local notebook titles as a second link inside the card, and the six cards that point into the PyMC docs showed their titles as unresolved references.Headings with inline code or
$...$math are converted to reST before they go intogallery.rst. This affects three notebooks today:GP-MaunaLoa2,AR, anddiscrete_markov_chain_marginalization.The Model Comparison and Prior and Posterior Predictive Checks cards had each other's thumbnails. They now show their own.
thumbnail_extractor.pynow takes the thumbnail from the first image of a cell taggedgallery-thumbnail. Notebooks without the tag still use their last image. The extractor also skips notebooks that git doesn't track, leaves out sections with no cards, and centers the vertical crop oncyinstead ofcx.Moved the pixi config from
pixi.tomlintopyproject.tomland added adocsenvironment.pixi run docs-buildbuilds the HTML into_build/, andpixi run docs-servebuilds and then serves it on 127.0.0.1:8000.The
docsenvironment's dependencies are copied fromrequirements-docs.txt. Read the Docs still installs from that file, so the two lists have to be kept in sync by hand.The generated gallery was checked against the live site. All 150 card titles match, apart from curly quotes that Sphinx adds at render time.