Skip to content

Add support for ZIM aliases alongside redirects - #355

Open
pawank925 wants to merge 1 commit into
openzim:mainfrom
pawank925:issue-148-alias
Open

pawank925 wants to merge 1 commit into
openzim:mainfrom
pawank925:issue-148-alias

Conversation

@pawank925

Copy link
Copy Markdown
Contributor

Add support for ZIM aliases, mirroring the existing redirect support.

  • Creator.add_alias() in zim/creator: adds an alias (shares the target item content, unlike a redirect) with optional title, is_front and duplicate_ok handling, matching the add_redirect API.
  • add_aliases_to_zim() in zim/filesystem: adds aliases from a list of (source, target, title) tuples and/or a zimwriterfs-compatible aliases TSV file.
  • make_zim_file() exposes new aliases and aliases_file parameters.
  • Deduplicator now uses the new Creator.add_alias() instead of the libzim-inherited method, so deduplicated entries get a proper title and front-article hint.

Fix #148

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (936498a) to head (4ab0081).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #355   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         2729      2761   +32     
  Branches       406       415    +9     
=========================================
+ Hits          2729      2761   +32     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pawank925

Copy link
Copy Markdown
Contributor Author

@benoit74

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for alias (in addition to redirection)

1 participant