Improve doc
This commit is contained in:
parent
f9b2da1bb0
commit
f88ac3c04e
8 changed files with 63 additions and 32 deletions
|
@ -1,3 +1,24 @@
|
|||
mixin type(prop)
|
||||
i= prop.type
|
||||
if prop.kind == 'id'
|
||||
if prop.entity
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| ID)
|
||||
else
|
||||
| (ID)
|
||||
else if prop.kind == 'entity'
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| )
|
||||
else if prop.kind == 'object'
|
||||
if prop.hasDef
|
||||
| (
|
||||
a(href=`#${prop.name}`)= prop.name
|
||||
| )
|
||||
else if prop.kind == 'date'
|
||||
| (Date)
|
||||
|
||||
mixin propTable(props)
|
||||
table.props
|
||||
thead: tr
|
||||
|
@ -9,23 +30,5 @@ mixin propTable(props)
|
|||
tr
|
||||
td.name= prop.name
|
||||
td.type
|
||||
i= prop.type
|
||||
if prop.kind == 'id'
|
||||
if prop.entity
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| ID)
|
||||
else
|
||||
| (ID)
|
||||
else if prop.kind == 'entity'
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| )
|
||||
else if prop.kind == 'object'
|
||||
if prop.hasDef
|
||||
| (
|
||||
a(href=`#${prop.name}`)= prop.name
|
||||
| )
|
||||
else if prop.kind == 'date'
|
||||
| (Date)
|
||||
+type(prop)
|
||||
td.desc!= prop.desc ? prop.desc[lang] || prop.desc['ja'] : null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue