| 1 | --- |
| 2 | name: importing-slides |
| 3 | description: Split presentations into multiple files for reusability |
| 4 | --- |
| 5 | |
| 6 | # Importing Slides |
| 7 | |
| 8 | Split presentations into multiple files for reusability. |
| 9 | |
| 10 | ## Basic Import |
| 11 | |
| 12 | ```md |
| 13 | # Title |
| 14 | |
| 15 | This is a normal page |
| 16 | |
| 17 | --- |
| 18 | src: ./pages/toc.md |
| 19 | --- |
| 20 | |
| 21 | <!-- Content here is ignored --> |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | # Page 4 |
| 26 | |
| 27 | Another normal page |
| 28 | ``` |
| 29 | |
| 30 | ## Import Specific Slides |
| 31 | |
| 32 | Use hash to select slides: |
| 33 | |
| 34 | ```md |
| 35 | --- |
| 36 | src: ./another-presentation.md#2,5-7 |
| 37 | --- |
| 38 | ``` |
| 39 | |
| 40 | Imports slides 2, 5, 6, and 7. |
| 41 | |
| 42 | ## Reuse Slides |
| 43 | |
| 44 | Import the same file multiple times: |
| 45 | |
| 46 | ```md |
| 47 | --- |
| 48 | src: ./pages/toc.md |
| 49 | --- |
| 50 | |
| 51 | <!-- later... --> |
| 52 | |
| 53 | --- |
| 54 | src: ./pages/toc.md |
| 55 | --- |
| 56 | ``` |
| 57 | |
| 58 | ## Frontmatter Priority |
| 59 | |
| 60 | Main entry frontmatter overrides imported file frontmatter for duplicate keys. |
| 61 |