Skip to main content

Plugin for MkDocs helping with rendering Entangled (entangled.github.io) projects.

Project description

Welcome to MkDocs Entangled Plugin

Using this plugin, you can make your Entangled documents look better.

Examples

Detailed examples are found in the entangled/mkdocs-examples repository.

Install

Install this with pip install mkdocs-entangled-plugin. To use the entangled plugin, add the following lines to your mkdocs.yml:

plugins:
  - entangled

markdown_extensions:
  - pymdownx.superfences
  - pymdownx.tabbed:
      alternate_style: true 

For more information, see the documentation.

Components

This plugin bundles functionality for literate programming with Entangled.

  • Annotate code blocks with titles.
  • Build artifacts using Make.

Annotate code blocks

The default markdown syntax that Entangled supports has fenced code blocks as follows

``` {.python file=examples/hello_world.py}
if __name__ == "__main__":
    <<hello-world>>
```

Which renders like this:

if __name__ == "__main__":
    <<hello-world>>

Or named code blocks

``` {.python #hello-world}
print("Hello, World!")
```

that render like this:

print("Hello, Universe!")

Build Artifacts

Build artifacts by specifying a Makefile.

=== "Figure 1"

    ![](fig/plot.svg)

=== "Source"

    ``` {.gnuplot file=examples/plot.gp}
    # enter your plotting commands here
    ```

    ``` {.make .build-artifact}
    .RECIPEPREFIX = >
  
    docs/fig/plot.svg: examples/plot.gp
    > mkdir -p $(@D)
    > gnuplot $^ > $@
    ```

=== "Figure 1"

![](fig/plot.svg)

=== "Source"

``` {.gnuplot file=examples/plot.gp}
set term svg background rgb 'white' size 700, 500
sinc(r) = sin(pi*r) / (pi*r)
set isosamples 50, 50
set hidden3d
set xrange [-4:4]
set yrange [-4:4]
set xyplane 0
set title "Sinc function"
splot sinc(sqrt(x**2 + y**2)) t'' lc rgb '#5533cc'
```

``` {.make .build-artifact}
.RECIPEPREFIX = >

docs/fig/plot.svg: examples/plot.gp
> mkdir -p $(@D)
> gnuplot $^ > $@
```

License

Licensed under the Apache-2 license agreement: see LICENSE

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_entangled_plugin-0.6.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_entangled_plugin-0.6.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_entangled_plugin-0.6.0.tar.gz.

File metadata

  • Download URL: mkdocs_entangled_plugin-0.6.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mkdocs_entangled_plugin-0.6.0.tar.gz
Algorithm Hash digest
SHA256 61296ca688cb7ddcd287234cbb5d1ab592f6d16a9008325089b510f22d262f4b
MD5 b0afdfcd65c95c38a3ddcad644a7d917
BLAKE2b-256 72161069b9b630e41b9ff222ac3977bf7968230edb0ed5f84eafe4cc804b152f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_entangled_plugin-0.6.0.tar.gz:

Publisher: python-publish.yml on entangled/mkdocs-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_entangled_plugin-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_entangled_plugin-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc5ebc47c754e3827e6472fe8aa49c556ff613a8f606a10d62ff5cf7566f5dd3
MD5 51b93e0a14ad535b6ecc033b766cb64e
BLAKE2b-256 e14f674e8961454e99ac591981a517a2f6bb77909df2ebad3d9e3624548c7a16

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_entangled_plugin-0.6.0-py3-none-any.whl:

Publisher: python-publish.yml on entangled/mkdocs-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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