bridgetownrb / bridgetown

A next-generation progressive site generator & fullstack framework, powered by Ruby
https://www.bridgetownrb.com
MIT License
1.16k stars 112 forks source link

The `render` stage of site building may cause Git `fatal` errors for every rendered page #490

Closed johlym closed 2 years ago

johlym commented 2 years ago

Bridgetown Version: bridgetown 1.0.0.beta2 "Pearl"

To Reproduce

Current behavior Bridgetown builds the site as instructed

Expected behavior Bridgetown builds the site as instructed One copy of fatal: not a git repository (or any of the parent directories): .git is printed for every generated page in output (For Heroku, a second line is printed: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).)

Screenshots CleanShot 2022-02-03 at 16 11 38@2x

CleanShot 2022-02-03 at 16 11 45@2x

Computing environment (please complete the following information):

Additional context I do not see a reason why the render stage should need to do anything git-related. A proper .gitignore would omit any produced output, and if the site is being deployed elsewhere and not pulled down from source control using git clone, this will always be an issue–the render stage assumes it's always being run in within an active Git repo.

I confirmed this is happening in the render stage by way of adding puts statements in processable.rb. I lost the scent after that without shoving more puts in a bunch of places.

jaredcwhite commented 2 years ago

I'm not able to reproduce this (for example I downloaded https://github.com/bridgetownrb/fundraising-site/tarball/main, extracted it, ran bundle/yarn install, and ran bin/bridgetown deploy without issue). If you can produce a link to your repo with this issue, I'll investigate further.

johlym commented 2 years ago

Wild. Here's where I'm seeing it: johlym/johnathan-org. I'll keep poking at it–yank stuff out until it goes away.

johlym commented 2 years ago

I've narrowed this down to the bridgetown-sitemap plugin. ~I'll open an issue there.~ Opened https://github.com/ayushn21/bridgetown-sitemap/issues/1.