Skip to main content

A plugin to convert the edit_uri for GitHub submodules

Project description

mkdocs-submodule-edit-uri

Build Status GitHub latest commit PyPi MIT license codecov

A super simple plugin to convert the edit_uri to match in GitHub submodules, allowing you to store parts of your docs on different repositories

Install using pip install mkdocs-submodule-edit-uri

Replaces a given old string to a new string wherever possible on mkdocs page content.

Usage

repo_url: https://github.com/user/repo
edit_uri: edit/main/docs/

plugins:
  - search
  - submodule-edit-uri:
      modules:
      - sub1:
          old: https://github.com/user/repo/edit/main/docs/SUBMODULE
          new: https://github.com/user/repo-SUBMODULE/edit/main
      - sub1-view:
          old: https://github.com/user/repo/raw/main/docs/SUBMODULE
          new: https://github.com/user/repo-SUBMODULE/raw/main
      - sub2-namedoesntmatter:
          old: https://github.com/user/repo/edit/main/docs/SUBMODULE2
          new: https://github.com/user/repo-SUBMODULE2/edit/main
      - sub2-namedoesntmatter-view:
          old: https://github.com/user/repo/raw/main/docs/SUBMODULE2
          new: https://github.com/user/repo-SUBMODULE2/raw/main

Note: If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. MkDocs enables it by default if there is no plugins entry set, but now you have to enable it explicitly.

Note: please have the old variable be as specific as possible, as to not accidentally replace any other strings that might match the old value.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-submodule-edit-uri-1.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file mkdocs-submodule-edit-uri-1.1.0.tar.gz.

File metadata

File hashes

Hashes for mkdocs-submodule-edit-uri-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d5923bb116fc3ba90bc8d1637828ad68a317ffe8df0421b816031ff172f2dbe1
MD5 4ce54d174651600f39c664b948f0dd7b
BLAKE2b-256 88f1db1b8ca6e4db5d19f739df7fb1339d485646213f4ad9b3634bcec101596f

See more details on using hashes here.

File details

Details for the file mkdocs_submodule_edit_uri-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_submodule_edit_uri-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 555431953747d4abaa3f65fe38deb7c626a6772c42de0423d42c320ac9e284ca
MD5 5c82ec9f8380f08dcc806d4f6a8c4fd2
BLAKE2b-256 4fc904410610927738267f23a394c6777056e8214c5eda3a112c4db803ce2ff3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page