File tree 5 files changed +20
-2
lines changed
5 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 8
8
9
9
[.contract]
10
10
[[{{ anchor }} ]]
11
- === `++{{ name }} ++`
11
+ === `++{{ name }} ++` link:{{ github-link file.path }} [{github-icon},role=heading-link]
12
+
13
+ [.hljs-theme-light.nopadding]
14
+ ```solidity
15
+ import "@openzeppelin/contracts/{{ file.path }} ";
16
+ ```
12
17
13
18
{{ natspec.devdoc }}
14
19
Original file line number Diff line number Diff line change
1
+ const { version } = require ( '../package.json' ) ;
2
+
3
+ module . exports = {
4
+ 'github-link' : ( contractPath ) => {
5
+ if ( typeof contractPath !== 'string' ) {
6
+ throw new Error ( 'Missing argument' ) ;
7
+ }
8
+ return `https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v${ version } /contracts/${ contractPath } ` ;
9
+ } ,
10
+ } ;
Original file line number Diff line number Diff line change
1
+ :github-icon: pass:[<svg class =" icon" ><use href =" #github-icon" /></svg >]
2
+
1
3
{{ #links }}
2
4
:{{ slug target.fullName }} : pass:normal[xref:{{ path }} #{{ target.anchor }} [`{{ target.fullName }} `]]
3
5
:xref-{{ slug target.anchor }} : xref:{{ path }} #{{ target.anchor }}
Original file line number Diff line number Diff line change 14
14
"compile" : " hardhat compile" ,
15
15
"coverage" : " hardhat coverage" ,
16
16
"docs" : " oz-docs" ,
17
- "docs:watch" : " npm run docs watch contracts 'docs/*.hbs'" ,
17
+ "docs:watch" : " npm run docs watch contracts 'docs/*.hbs' docs/helpers.js " ,
18
18
"prepare-docs" : " scripts/prepare-docs.sh" ,
19
19
"lint" : " npm run lint:js && npm run lint:sol" ,
20
20
"lint:fix" : " npm run lint:js:fix && npm run lint:sol:fix" ,
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ solidity-docgen \
15
15
-o " $OUTDIR " \
16
16
-e contracts/mocks,contracts/examples \
17
17
--output-structure readmes \
18
+ --helpers ./docs/helpers.js \
18
19
--solc-module ./scripts/prepare-docs-solc.js
19
20
20
21
node scripts/gen-nav.js " $OUTDIR " > " $OUTDIR /../nav.adoc"
You can’t perform that action at this time.
0 commit comments