Closed tim-becker closed 1 year ago
Hey @tim-becker, sorry I'm just now seeing this. Can you share an example situation where you'd want to show the relative path?
@frangio Sure. We are using this repo to generate docs for our solidity SDK. We prefer the single page layout, but we want the relative path of each object to be displayed so that users know the relative path to import when using our SDK.
Resolved by https://github.com/OpenZeppelin/solidity-docgen/commit/1841eebf65fabe7e8956e5ae197af8741942e758.
I ended up adding relativePath
as a property in context.file
, so you would access it in a template by:
File: `{{__item_context.file.relativePath}}`
One downside to the
single
page layout is that the objects' file paths are lost. This change displays the relative file paths for each contract object