ドキュメントをMarkdownで書くように

This commit is contained in:
syuilo 2018-07-15 18:28:08 +09:00
parent d47f92f396
commit 5f5156561f
32 changed files with 165 additions and 327 deletions

31
src/docs/api/mixins.pug Normal file
View file

@ -0,0 +1,31 @@
mixin propTable(props)
table.props
thead: tr
th= i18n('docs.api.props.name')
th= i18n('docs.api.props.type')
th= i18n('docs.api.props.description')
tbody
each prop in 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)
td.desc!= prop.desc ? prop.desc[lang] || prop.desc['ja'] : null