httk.core.docs.redirect

Generate the relative root redirect for a versioned documentation site.

Functions

root_redirect_html(target_relative_path)

Return a complete HTML5 document redirecting to a relative site path.

write_root_redirect(site_root, target)

Write index.html at site_root with a relative redirect to target.

Module Contents

httk.core.docs.redirect.root_redirect_html(target_relative_path)

Return a complete HTML5 document redirecting to a relative site path.

Parameters:

target_relative_path (str) – Relative path receiving the redirect.

Returns:

HTML redirect document.

Return type:

str

httk.core.docs.redirect.write_root_redirect(site_root, target)

Write index.html at site_root with a relative redirect to target.

Parameters:
  • site_root (str | pathlib.Path) – Site root receiving the redirect file.

  • target (str) – Relative path receiving the redirect.