Skip to content

Conversation

@atteggiani
Copy link
Contributor

Fixes #3.

PR Overview

  • A prefix input parameter was added, allowing the absolute link prefix to be easily controlled by the user. Default value has been set to current version's prefix site:.
  • The prefix is escaped (using re.escape) to avoid potentially treating the prefix characters as regex special characters.
  • A very simple unit testing suite was added, to increase the robustness of the plugin
  • Few improvements in some portions of the plugin, without modifying functionality.

Integration tests

I didn't peform any integration test as I don't have quick ways to check that the outputs of the current version of the plugin (witihout this PR) are the same of the ones with this PR included (with default input parameters).
Please feel free to perform these tests, and if there are any issues I'm happy to work on them.

Cheers
Davide

@atteggiani atteggiani force-pushed the 3-add_prefix_input branch from 4eb0c3d to 17f0014 Compare June 9, 2025 10:36
@foosel foosel force-pushed the 3-add_prefix_input branch from 498f6d6 to badc546 Compare June 20, 2025 12:49
@foosel
Copy link
Member

foosel commented Jun 20, 2025

This required some work which I took care of however:

  • Your tests were broken - attempting to import the wrong plugin. I fixed that.
  • pre-commit was not happy (which is why a check was red on your original PR), that's fixed too.
  • I documented the new config option in the docs.
  • I added the test suite to the CI build job.
  • I changed some phrasing and reverted a change to the name of an internal function.

@foosel foosel merged commit 5e2fc5b into OctoPrint:main Jun 20, 2025
4 checks passed
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.

Make the absolute link prefix (site:) an input parameter

2 participants