Skip to content

mkdocs_nype.plugins.nype_tweaks.utils

MACROS_INCLUDES_ROOT

MACROS_INCLUDES_ROOT: Path = THEME_ROOT / 'macros_includes'

mkdocs_nype/macros_includes directory

ServeMode

Helps to track if serve runs again

run_once

run_once = False

Toggle

get_file_system_loader

get_file_system_loader(value: str | list[str])

Proxy function to get the Jinja2 FileSystemLoader with theme macros_includes

is_hex_string

is_hex_string(text: str)

Check if strings are represented in hex digits. Doesn't support 0x notation.

obfuscate

obfuscate(text: str)

Turn plain text into base64 and obfuscate it as hex

deobfuscate

deobfuscate(hex_text: str)

Turn hex back to string

post_card_title

post_card_title(post: Excerpt)

Get the title from the HTML, as post.title can differ

post_card_description

post_card_description(post: Excerpt)

Get the contents of the Excerpt after the H2 tag