Repository navigation
docs: migrate to Zensical, refresh catalog - #165
Merged
Merged
Conversation
- Build with zensical instead of mkdocs + mkdocs-material. MkDocs hooks and gen-files are replaced by a pre-build step (`docs/_gen_catalog.py`) and the zensical macros extension (`docs/_macros.py`). - Catalog sidebar now lists categories (with new per-category pages) instead of every colormap, which shrinks colormap pages from ~340 KB to ~30 KB and the built site from ~208 MB to ~46 MB. - Catalog grid: filter by name/alias, source and monotonic lightness. - Colormap pages: CVD simulation now applies to the colorbars and sine ramp (rendered client-side), charts follow the light/dark theme, code tabs for matplotlib/napari/CSS, prev/next links and a "compare" button. - New compare page with shareable URLs. - Relative links throughout, so the GitHub Pages copy (served under /cmap/) works too. Absolute catalog links in colormap `info` are rewritten. - Chart.js 4.1.2 -> 4.5.1; drop the Material Icons font, unused chart data, and unused docs dependencies (colorcet, imageio). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The separator carried over from mkdocs.yml breaks zensical's search worker
("Search is unavailable").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exclude code tabs, chart sections, the pager and catalog grids from search (colormap pages themselves stay indexed). search.json: 1.3 MB -> 380 KB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rendered client-side like the sine ramp, so they follow the CVD toggle. Ported from Kovesi's circlesineramp.m and MATLAB's peaks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efault Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #165 +/- ##
==========================================
+ Coverage 94.62% 95.73% +1.11%
==========================================
Files 168 168
Lines 2232 2228 -4
==========================================
+ Hits 2112 2133 +21
+ Misses 120 95 -25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to docs/zensical
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- canonical urls point at /en/stable/; remove 'edit this page' - breadcrumbs on colormap pages; fix prev/next pager layout - alphabetical 'All' catalog; leaner search entries for colormap pages - deep purple accent in light mode (pink fails contrast on white) - installation, quick start and 'mapping data to colors' docs - minify css/js, watch src, svg favicon, fix data cache key - fix typos and add the typos pre-commit hook Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ormap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tips - compare: dash pattern per line, gradient lines, optional petroff6 colors, explicit 6-map limit - category intros, 'All collections', non-sticky filter on small screens - named colors: aliases share a box, contrast-based text, no clipping - API page in __all__ order (most important first) - higher-contrast pills; tidier colormaps page examples; subtler external-link arrow; solid tooltip swatches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Zensical's tooltips also open on focus, and clicking a label focuses its input, so put the titles on the labels' text instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t derivative axis Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use np.gradient (same length as x, one-sided at the ends) instead of np.diff padded with a leading 0, and differentiate with respect to x itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- catalog/collections/: an index of collections, and a page for each with its license, authors and source, and its colormaps - colormap pages link to their collection - catalog filters are read from and written to the URL (?q=&collection=&category=&monotonic=1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…compare page The compare page gets an Image section: pick, drop or paste an image (it stays in the browser), and it's shown in grayscale and through each colormap, with the CVD simulation. Two samples: a cat (photo by Talley Lambert), and elevation around Corsica for diverging colormaps. corsica.png is from NOAA NCEI's ETOPO 2022 15 Arc-Second Global Relief Model (CC0-1.0, https://doi.org/10.25921/fd45-gt74): https://coastwatch.pfeg.noaa.gov/erddap/griddap/ETOPO_2022_v1_15s.csv?z[(41.2):1:(43.2)][(8.0):1:(10.2)] flipped north up and scaled as round(255 * (0.5 + z / (2 * max|z|))), so that sea level is the middle value. Also: sticky colormap input and CVD pills, and Colorbars / Image / Lightness headings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The snippet tabs on each colormap page are now cmap, matplotlib, plotly, napari, CSS and More..., with a short example for each of altair, bokeh, vispy, pygfx, pyqtgraph and Earth Engine. The napari example used `napari.view_image`, which no longer exists (napari 0.9): it now uses `napari.imshow`. Also: hide the name label on the colorbars of a colormap's own page, and fix the pygfx return type in colormaps.md (a TextureMap). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te styles and dependencies
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.
Moves the docs from MkDocs to Zensical and gives the colormap catalog a pretty big refresh.
Build and hosting:
python docs/_gen_catalog.py, thenzensical build..readthedocs.yamlis updated to matchCatalog:
crameri), plus a collections indexnapari.view_image, which is gone in napari 0.9... it now usesnapari.imshowNew compare page:
Other stuff:
cmap._util.report()derivatives now usenp.gradient, so they no longer start with a padded zero__all__is reordered so the API page leads withColormapandColorRTD preview: https://cmap-docs--165.org.readthedocs.build/en/165/
🤖 Generated with Claude Code