How to add example to my registered library?

I’ve read the documentation but didn’t find how to add example code to a library.

Can you point to the relevant documentation?

Meanwhile, I’ve found Redirecting...
The “A list of example patterns.” sentence wasn’t clear to me. So the question is how this filed work? Can I point to an external directory? E.g.*.c

No, examples should be in source code which we export.