todvora / gitbook-plugin-image-captions

Image captions plugin for GitBook
Apache License 2.0
44 stars 18 forks source link

Dynamically reference images in content #24

Open rwestergren opened 6 years ago

rwestergren commented 6 years ago

Refer to image figures in content dynamically with a filter:

{{ "/assets/image.png" | fig }}

Produces "Figure 1.2.3" after rendering. Template configurable via:

    "pluginsConfig": {
         "image-captions": {
          "caption": "Figure _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_",
          "reference": "Figure _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_"
      }
    }