erintheunready / ComicControl

The main repo for ComicControl Development.
25 stars 8 forks source link

[Bug] Code Duplication between blog-rss and comic-rss #36

Open JulianWebb opened 2 years ago

JulianWebb commented 2 years ago

(Not really a "bug" per say, more of a code smell)

Description of problem

Currently the parts blog-rss.php and comic-rss.php are near duplicates, only differing by 6 lines; while this isn't a problem by itself, it can easily lead to issues in the future if they aren't both updated each time shared functionally needs to be changed.

Suggested fix

Create a base RSS part for them to both pull from, requiring that they only need to add their specific variables to the channels and items.

JulianWebb commented 2 years ago

Better yet, make a generic RSS generator that can be configured using templates, that way site owners can configure their RSS feed as they wish while still having that base.