镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Proposal: Add a Writing Doc overview to the Contributing Guide #1886

Open

Description

@pushfoo

Documentation request:

tl;dr add a Contributing Guide page / section containing the most common and/or arcade-specific sphinx concerns

This is a follow-up to a Discord conversation

What the overview should have

  • What, where, when, and how to add things:

    • Purpose & location of each:
      • Programming guide
      • Examples
      • Tutorials
      • Docstrings
  • Guidelines for instructions

    • Link an external source if other general doc exists
    • Put it on its own page otherwise
  • Which build formats are priority support targets

    • Model off of NetBSD's tier system? (https://www.netbsd.org/ports/#tiers)
    • Arcade doc support tiers prioritize game prototyping and offline education
      1. Primary: HTML readthedocs
      2. Secondary: PDF, ePUB (?)
      3. When it doesn't interfere with the top 2 + time allows: Everything else
  • The most common problems and how to deal with them

    • Sphinx header underlines must have correct length to avoid sphinx warnings which break build

    • tl;dr of how to link things

      • Agree on link name pattern / structure
      • Internal links: :ref:`internal_link_name`
      • Named external links need trailing underscore in the angle brackets:
        • Correct: `text <ref_name_>`_
        • Broken: `text <ref_name>`_
      • Intersphinx usage:
        • For Python doc: :py:class:`Sequence` should just work
        • pyglet should be the same way, but may require some prefixes
        • Unsure if should be included: :external: for link targets to headings
    • Toctrees

      • Item not in any toctree
      • @cspotcode's #include analogy
      • tl;dr of what a virtual hierarchy is
      • :hidden:, :includehidden: & furo
  • Tips, such as HTML-only behavior

    • rawhtml isn't rendered in PDFs
      • Find out whether this applies to other build formats we might want (ePUB, other ebook formats)
  • Links to more general sphinx doc

What the page should avoid

  • Explanations of general Sphinx functionality when not directly relevant to arcade problems
  • Detailed instructions

Activity

  1. pushfoo commented on Sep 23, 2023

    @pushfoo
    MemberAuthor

    An optional item I'm not yet sure on: using the :external: role with intersphinx.

    Pros:

    1. If link target names stay the same, URLs auto-update on each build
    2. Cleaner than including the entire URL
    3. Does not break existing links

    Cons:

    1. Assumes the link target name will stay the same in the target project
    2. Assumes we've added a project in intersphinx
    3. Assumes projects will continue exporting objects.inv files
  2. pushfoo commented on Nov 8, 2023

    @pushfoo
    MemberAuthor

    Further style notes from recent PR reviews / etc:

    1. Use ``.. code-block:: pythoninstead of theEnd of line::\n` syntax
    2. Use the english word when writing small numbers < 10 (Contested, > 3 should be a number)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions