Compodoc incldue images within docs

984 views Asked by At

This is an Angular project with compodoc to help document project.

In the compodoc > demo they showed some examples of documents with images I was trying to replicate this within my project but could not make it work.

I have followed this thread instructions. To my understanding, the steps are as follows:

  1. At the root of the project create a folder
  2. Name the directory with -a flag: -a screenshots <-(Am I reading this right?)
  3. When npm run compodoc. It should copy -a screenshots to documentation/screenshots

For me, it is not copying the asset folder into the documentation directory. Does anyone know how to make this work? Compodoc's documentation does not talk about how to include images.

Screen shot of my file structure: enter image description here

Thanks you.

1

There are 1 answers

0
Colin Edwards On BEST ANSWER

-a is a flag and is shorthand for --assetsFolder.

  1. Create a folder e.g. 'screenshots' at the root of your project
  2. Reference your image in markdown e.g. ![Screenshot-1](screenshots/homepage.png)
  3. Use compodoc -p tsconfig.json -a screenshots -s to run compodoc and copy your assets folder