ayushn21 / bridgetown-sitemap

A Bridgetown plugin to generate a sitemap.xml
MIT License
15 stars 4 forks source link

base.rb throws git errors when site is not in a git repo #1

Closed johlym closed 2 years ago

johlym commented 2 years ago

I originally brought this up in https://github.com/bridgetownrb/bridgetown/issues/490 but after some testing, was able to narrow it down to this plugin.

There are cases where a Bridgetown site may be deployed without existing in an active git repo (.git folder present), and as such, git commands will not work and throw errors. For sites with a lot of content, this creates a wall of git error noise.

https://github.com/ayushn21/bridgetown-sitemap/blob/main/lib/bridgetown/resource/base.rb#L12 - This logic should consider if git is available and if not, skip it.

ayushn21 commented 2 years ago

Thanks for raising this @johlym, I'll work out a fix :)

ayushn21 commented 2 years ago

Should be fixed by https://github.com/ayushn21/bridgetown-sitemap/commit/dd1bc493d7c78f780b3bae28364cbfb07593a07d. Let me know if the issue persists :).

I'll create a bugfix release for this shortly.

ayushn21 commented 2 years ago

Released in v1.1.2