sphinx-doc / sphinx-doc/sphinx

Is it possible to add external online code?

Open
#7,525 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

markup type:enhancement
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

.. literalinclude:: seems to be able to include a source file directly, for instance: example.py.

What if this example.py is at http://www.test.com/example.py ? Can we insert the online code directly?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the literalinclude directive and trace how it resolves a local source such as example.py. Review the existing include-related documentation and tests before determining the expected behavior for an HTTP URL. Done means the behavior is decided, documented, and covered by tests if support is added.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.