Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
pushfoo opened this issue Aug 23, 2023 · 2 comments
Open
2 tasks

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

pushfoo opened this issue Aug 23, 2023 · 2 comments

Comments

@pushfoo
Copy link
Member

pushfoo commented Aug 23, 2023

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
@pushfoo
Copy link
Member Author

pushfoo commented Sep 23, 2023

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

@pushfoo
Copy link
Member Author

pushfoo commented Nov 8, 2023

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
Projects
None yet
Development

No branches or pull requests

2 participants