Skip to main content

lektor plugin: inlinetags

The inlinetags plugin allows you to use tags inside normal text / html / markdown elements. For example, you can write This is my {{Lektor}} powered website and it will automatically replace the tag with a link to the actual page: This is my <a href="/tag/lektor/">Lektor</a> powered website.

Of course, you can configure a different matching pattern, e.g., instead of the default {{tag}} use $tag$ (\$(.{1,20}?)\$).

This plugin is based on the lektor-groupby plugin. All configuration options from groupby can be used (including multiple attribute names). Further, you can access the tags of a page with the filter |vgroups(key1, key2, recursive=False) where key is 0..N attribute keys. If no key is provided, all attributes will be returned – otherwise only matching attribute keys.

Example config file

Add a new inlinetags = True attribute to your model, e.g., a flow block:

[block]
name = Text Element
button_label = [[paragraph]]

[fields.content]
label = Text
type = markdown
inlinetags = True

In your plugin config (configs/inlinetags.ini):

[inlinetags]
root = /
slug = tag/{key}/
template = tag-page.html

[inlinetags.pattern]
match = {{([^}]{1,32})}}
replace = <a class="tag" href="{url}">{name}</a>

[inlinetags.fields]
title = "Tagged: " ~ this.key_obj

[inlinetags.key_map]
C# = c-sharp

Metadata

Release files for lektor-inlinetags 0.9.2

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

Source distribution (sdist)

Source distribution for lektor-inlinetags 0.9.2
File Size Uploaded Provenance
lektor-inlinetags-0.9.2.tar.gz 3.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lektor-inlinetags 0.9.2
File Interpreter ABI Platform
lektor_inlinetags-0.9.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / lektor-inlinetags-0.9.2.tar.gz

Download URL lektor-inlinetags-0.9.2.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
72fda54f1febd2298ca600893bcfabc33c1d9b5702b31e5ae81b7b3723b3702d
BLAKE2b-256 checksum
How to use checksums
1b062607eb935836d17c17bedd99102b2f4a7d44dca721c189103757324f2ac0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.2

Release files / lektor_inlinetags-0.9.2-py3-none-any.whl

Download URL lektor_inlinetags-0.9.2-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db910fe527093a9f778e899d422a50ef8ac323f78ad8ae51c8fce2984a262e20
BLAKE2b-256 checksum
How to use checksums
69ddcd69a17ef908060225e019b3a302baf0851621363c5627887637f49a298a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.2

Security for lektor-inlinetags 0.9.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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