Skip to content

Commit

Permalink
od unimplemented args can now be documented in the ref (#22)
Browse files Browse the repository at this point in the history
```toml
[[extra.args]]
name = "foo we don't implemented"
type = "/something/wacky"
od_unimplemented = true
  • Loading branch information
hry-gh authored Aug 6, 2024
1 parent b4c9c3e commit 4e5be2a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Zola allows us to put arbitrary TOML under the [extra] section, which we do for
- Procs:
- `return_type_desc` - This allows us to add extra information about the return type - for example, what specific return types mean. It can also be used to document the return type if not pulled from DMStandard.
- `[[args.description]]` - We can document individual arguments to procs with the `description` field. These edits will not be removed by the Autodocumentation tool.
- `[[args.od_unimplemented]] - If this argument is implemented or not in the OpenDream implementation of BYOND.
- Vars:
- `default_value_desc` - This allows us to add extra information about the default value that this variable is set to.

Expand Down
13 changes: 13 additions & 0 deletions static/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,10 @@ video {
margin-left: 0.25rem;
}

.ml-2{
margin-left: 0.5rem;
}

.mt-1{
margin-top: 0.25rem;
}
Expand All @@ -585,6 +589,10 @@ video {
display: block;
}

.inline{
display: inline;
}

.flex{
display: flex;
}
Expand Down Expand Up @@ -749,6 +757,11 @@ video {
color: rgb(107 114 128 / var(--tw-text-opacity));
}

.text-red-400{
--tw-text-opacity: 1;
color: rgb(248 113 113 / var(--tw-text-opacity));
}

.text-red-500{
--tw-text-opacity: 1;
color: rgb(239 68 68 / var(--tw-text-opacity));
Expand Down
2 changes: 1 addition & 1 deletion templates/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<div class="text-xl">Arguments:</div>
<ul>
{% for arg in page.extra.args %}
<li class="pl-5">{{arg.name}}{% if arg.type %} ({{ self::render_single_type(type=arg.type)}}){% endif %}{% if arg.description %}: {{arg.description}}{% endif %}</li>
<li class="pl-5">{{arg.name}}{% if arg.type %} ({{ self::render_single_type(type=arg.type)}}){% endif %}{% if arg.description %}: {{arg.description}}{% endif %}{%- if arg.od_unimplemented -%}<div class="text-sm text-red-400 border-l-2 border-red-400 pl-2 inline ml-2">Unimplemented 🏗️</div>{%- endif -%}</li>
{% endfor %}
</ul>
</div>
Expand Down

0 comments on commit 4e5be2a

Please sign in to comment.