mkdocs-gallery icon indicating copy to clipboard operation
mkdocs-gallery copied to clipboard

Fix page metadata also for gallery examples

Open smarie opened this issue 5 months ago • 3 comments

          Thanks @smarie! Just to say that `feature/96_97_issues` fixes the issue with the `README.md`!

I do have a follow up question/problem though: I'd like to use the same page setup in my examples.

examples/plot_00_test.py

"""
---
hide:
    - toc
---

Plotting Overview
=================
"""
...

generated/gallery/plot_00_test.md

<!--
 DO NOT EDIT.
 THIS FILE WAS AUTOMATICALLY GENERATED BY mkdocs-gallery.
 TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
 "docs/examples/1_plotting/plot_00_plotting_intro.py"
 LINE NUMBERS ARE GIVEN BELOW.
-->

!!! note

    Click [here](#download_links)
    to download the full example code


---
hide:
    - toc
---

Plotting Overview
=================
....

Unsurprisingly mkdocs renders this incorrectly: Screenshot 2024-09-04 at 14 31 13

Is there any chance you could pass through headers in the example files too?

Originally posted by @schlegelp in https://github.com/smarie/mkdocs-gallery/issues/96#issuecomment-2329073234

smarie avatar Sep 04 '24 13:09 smarie