OpenZeppelin / solidity-docgen

Documentation generator for Solidity projects
MIT License
452 stars 118 forks source link

anchor is always empty #441

Closed migoldfinger closed 1 year ago

migoldfinger commented 1 year ago

Hello,

I tired to use {{anchor}} in one of my templates but it did turn out that it is always empty. I looked into the code and see that anchor is generated with slug so i suspect that slug is empty too. I did not find any documentation of how to set the slug so I assumed it is set automatically.

So either anchor and slug do not work at the moment and need fixing or there is a need for an working example of how to use anchor in solidity-docgen.

frangio commented 1 year ago

What version are you running?

migoldfinger commented 1 year ago

I just added it yesterday to my package.json solidity-docgen": "^0.6.0-beta.35"

Thats what I get after running npm i -D solidity-docgen

frangio commented 1 year ago

Actually there is no anchor by default in 0.6. For OpenZeppelin Contracts we define that here:

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1642b6639b93e3b97be163d49827e1f56b81ca11/docs/templates/properties.js#L4

migoldfinger commented 1 year ago

thx thats helping a lot.