lektor / lektor-tags

For each tag on your site, build a list of pages with that tag. This can be used for standard tag-based blog navigation.
MIT License
27 stars 6 forks source link

Improve tag counting #25

Closed blochberger closed 2 years ago

blochberger commented 2 years ago

I found two (minor) issues with counting tags:

  1. Duplicates could be used to skew the tag count. For example, a page with a duplicate tag would be counted twice for that tag.
  2. The list of all tags can be configured for the plugin, but tag counting did not consider this configuration option.
dairiki commented 2 years ago

@blochberger (I don't use this package myself, but) your fixes look good to me. Thank you.

I think I've just fixed all the bitrot in the master branch that was causing the test failures here. Please try rebasing your work onto the current master to see if that gets the tests to pass.

blochberger commented 2 years ago

Please try rebasing your work onto the current master to see if that gets the tests to pass.

Did that and at least the tests passed locally. I saw test failures before, but just ran the tagweights tests, which worked fine.

dairiki commented 2 years ago

@blochberger Looks good. Thank you!

dairiki commented 2 years ago

Released just now in lektor-tags==0.5.1.