Skip to main content

Lektor root-relative-path plugin

This plugin returns root-relative-path list from top page to current page as below.

[(toppage_url, toppage_name), ...(parent_url, parent_name), (url, name)]

Installation

Add lektor-root-relative-path to your project from the command line:

lektor plugins add lektor-root-relative-path

See the Lektor documentation for more instructions on installing plugins.

Configuration

Set these option in configs/root-relative-path.ini:

navi_top_page_name

Optional. Name of top page inidicated in the navication. Default is 'Top Page'

navi_top_page_name = 'Top Page'

How to use

Insert the following line in the template (e.g. layout.html) which you would like to show navigation.

{% for i in this._path | root_relative_path_list %}
  >><a href="{{i[0]}}">{{i[1]}}</a>
{% endfor %}

Then, navigation is shown as below in case the page 'blog/first-post/'

>>Top Page >>blog >>first-post

If you do not want to show current page in the navigation, modify template as below.

{% for i in this._path | root_relative_path_list %}
  {% if not loop.last %}
    >><a href="{{i[0]}}">{{i[1]}}</a>
  {% endif %}
{% endfor %}

Then, navigation is shown as below.

>>Top Page >>blog

Metadata

Release files for lektor-root-relative-path 0.2.1

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-root-relative-path 0.2.1
File Size Uploaded Provenance Actions
lektor-root-relative-path-0.2.1.tar.gz 2.5 kB Without provenance Details for lektor-root-relative-path-0.2.1.tar.gz

Release files / lektor-root-relative-path-0.2.1.tar.gz

Download URL lektor-root-relative-path-0.2.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6698da2afbdce0f696626b5b2fe7c9d496b235b1c879385bfd5387947a52c407
BLAKE2b-256 checksum
How to use checksums
fd29892f09298e0e05a625c93a64f29c8f6aae03a2f5481bdf178575a0f98486
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Security for lektor-root-relative-path 0.2.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file No provenance

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