Skip to content

Update the content for the contract reference index page #244

@dweng0

Description

@dweng0

Problem

The index for the auto generated contracts is not showing relevant data.

In detail

The document listing index for the auto generated contracts is no longer fit for purpose, there are several issues with it:

  • It refers to examples that no longer exist:
    Image

  • The descriptions for each contract are not consistently provided.

Solution

  • determine if the index page is required.
  • Remove the call out card
  • Update the auto generated documentation to put the @notice for a contract in the front matter and not render it on the body. For example this:
---
title: ACU
description: 'Computes the value of the ACU, an optimal currency basket of'
---

instead of placing it just below the frontmatter as is currently being done:

---
title:·"ACU"
---

Computes·the·value·of·the·ACU,·an·optimal·currency·basket·of·7·free-floating·fiat·currencies.
  • If a contract does not provide an @notice at the contract level, then provide an empty description with one space:
---
title:·"ACU"
description:·"·"
---           

Reasoning

By using the description tag in the frontmatter. we prevent quarto from using the first paragraph it finds to fill the description slot in the index. Then if a contract doesn't have a @notice that can be used, we can provide a string with one space to prevent Quarto from rendering the first paragraph it finds.

This
Image

becomes this
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeeds prioritisation and/or scheduling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions