Skip to main content

Test pluglet for mkdocs-macros

What it is

This is a test pluglet for mkdocs-macros. Its purpose is to serve as a template for pluglets.

It exports three macros, which can be used in markdown pages, and aren't particularly interesting:

  • test_fn(x:float): an arithmetic expression.
  • say_hello(s:str): displays Hello followed by the string, in italics.
  • test_fn2(s:str): same as say_hello()but does it slightly differently

For example, you could write:

He said {{ say_hello('Joe') }}.

Which will be translated into HTML as:

He said <i>Hello Joe</i>

How to install it

Directly from pypi: pip install mkdocs-macros-test

Or directly from the github repository: download the package and run: python setup.py install

How to call it from an MkDocs project

In the config (mkdocs.yml) file:

plugins:
  - search
  - macros:
      modules: ['mkdocs_test`] 

Notes

https://github.com/fralau/mkdocs_macros_plugin question - can this plugin be used to change the jinja2 environment that mkdocs uses?

use case: i would like to be able to install a jinja2 extension and then use that extension in my custom mkdocs theme

in particular: https://github.com/danielchatfield/jinja2_markdown

https://github.com/fralau/mkdocs_macros_plugin/blob/master/mkdocs_macros/plugin.py#L583

Metadata

Release files for mkdocs-macros-test-ntno 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-macros-test-ntno 0.0.0
File Size Uploaded
mkdocs_macros_test_ntno-0.0.0.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-macros-test-ntno 0.0.0
File Interpreter ABI Platform
mkdocs_macros_test_ntno-0.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.1 kB

Release files / mkdocs_macros_test_ntno-0.0.0.tar.gz

Download URL mkdocs_macros_test_ntno-0.0.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a99e6e617b354ba7adb7ac17b7d73ed804dc4cc3523f045c3d17e5cadc6f3988
BLAKE2b-256 checksum
How to use checksums
c167873cae37f316a1fb88da4373616b501d05305ce9e9f3bd550944b8e649f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / mkdocs_macros_test_ntno-0.0.0-py3-none-any.whl

Download URL mkdocs_macros_test_ntno-0.0.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b9abd19f9cf4c44830ae53d035b2a6fcabf4538a9931824bf6980702abd074e
BLAKE2b-256 checksum
How to use checksums
eee99769b871ee8698f40e89257490eea19b4ab8f9e45168fb75a4c5b3fdfba1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page