Skip to main content

render-engine-clean-urls

A render-engine plugin that mirrors each single page's output to <slug>/index.html, so the page is reachable at the clean URL /<slug>/ in addition to the original /<slug>.html.

The plugin is non-destructive: the original <slug>.html file is left in place, and a copy is written at <slug>/index.html. Existing internal links of either form continue to work.

What gets rewritten

The plugin only mirrors top-level single pages that use the default route (["./"]). The following are skipped:

  • The homepage (slug index by default)
  • Collections and the pages they generate
  • DataObjects
  • Pages with an explicit class-level path_name
  • Pages with a non-default routes value

Install

pip install render-engine-clean-urls

Or with uv:

uv add render-engine-clean-urls

Usage

from render_engine import Page, Site
from render_engine_clean_urls import CleanURLsPlugin

app = Site()
app.plugin_manager.register_plugin(CleanURLsPlugin)

@app.page
class About(Page):
    content_path = "about.html"

After app.render(), the output directory contains both:

output/about.html
output/about/index.html

so /about.html and /about/ both resolve to the same content.

Configuration

Skip additional slugs by registering with Site.register_plugins:

app.register_plugins(
    CleanURLsPlugin,
    CleanURLsPlugin={"skip_slugs": {"index", "robots"}},
)

skip_slugs defaults to {"index"}.

How it works

The plugin implements render-engine's post_build_site hook. After all pages have been rendered to disk, it walks site.route_list, identifies the single Page entries that should be mirrored, and copies each output/<slug>.html to output/<slug>/index.html.

Because the work happens after the normal build, the plugin doesn't change any page metadata, URLs returned by url_for(), or the site map.

License

MIT — see LICENSE.

Metadata

Release files for render-engine-clean-urls 0.1.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 render-engine-clean-urls 0.1.0
File Size Uploaded Provenance
render_engine_clean_urls-0.1.0.tar.gz 4.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for render-engine-clean-urls 0.1.0
File Interpreter ABI Platform
render_engine_clean_urls-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / render_engine_clean_urls-0.1.0.tar.gz

Download URL render_engine_clean_urls-0.1.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fee32f7df5c77f64dc8da92e616077c178007f3b979dc6065f42ad871f67949a
BLAKE2b-256 checksum
How to use checksums
78838da43d139189c28432d66df088b69c9be994639681588871bc127936f2db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 15, 2026.

Transparency log

Release files / render_engine_clean_urls-0.1.0-py3-none-any.whl

Download URL render_engine_clean_urls-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7406897782b0cb914a8a28d5a320eee430d115ad41c248745bb65613b0b5c81f
BLAKE2b-256 checksum
How to use checksums
911caf73d875c42c3828b22ba0fa4ebd99a49654c8c15f04e4325e5b05b7a74e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 15, 2026.

Transparency log

Security for render-engine-clean-urls 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for render_engine_clean_urls-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 15, 2026.

Transparency log

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.1.0 This release

2 release files Full 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