Skip to content

create asserts a default page width that update leaves alone #184

Description

@willkg

create gives every new page a width of max when the file declares none. resolveWidth (cmd/create/create.go) walks --page-width, then frontmatter page_width, then the project file's page_width, and falls back to pagewidth.DefaultWidth when all three are silent. update does the opposite: an absent page_width makes no width request at all and leaves the live width alone.

That makes the two writing verbs disagree about what an absent field means, and it is the one thing keeping L9 (declared-metadata-is-asserted: a field the file declares is made true of the page; a field it omits leaves the page alone) from holding in both verbs. labels and page_status already hold in both.

The question is a decision rather than a bug fix:

  • Leave Confluence's own default. create makes no width request when nothing declares one, matching update and labels. A new page gets whatever Confluence gives a page created through the API.
  • Keep max as house style, but make it a declaration. For example, export and the docs recommend page_width: max in markfluence.yaml, and create asserts only what is declared.
  • Keep the current behavior and say in the principles doc that create asserts a default width, as an accepted exception.

Whichever it is, update and create should agree, or the difference should be written down on purpose.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions